mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 09:51:22 +02:00
- dt: formatting code using astyle
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
18
src/dt.c
18
src/dt.c
@@ -71,13 +71,16 @@ int main(int argc, char **argv)
|
||||
|
||||
t = time(NULL);
|
||||
tmp = localtime(&t);
|
||||
if (tmp == NULL) {
|
||||
if (tmp == NULL)
|
||||
{
|
||||
perror("localtime");
|
||||
}
|
||||
if (strftime(h, sizeof(h), "%_H", tmp) == 0) {
|
||||
if (strftime(h, sizeof(h), "%_H", tmp) == 0)
|
||||
{
|
||||
fprintf(stderr, "strftime returned 0\n");
|
||||
}
|
||||
if (strftime(m, sizeof(m), "%_M", tmp) == 0) {
|
||||
if (strftime(m, sizeof(m), "%_M", tmp) == 0)
|
||||
{
|
||||
fprintf(stderr, "strftime returned 0\n");
|
||||
}
|
||||
|
||||
@@ -129,14 +132,16 @@ int main(int argc, char **argv)
|
||||
}
|
||||
else if (sscanf(argv[x], "-ls%X", &b) == 1)
|
||||
{
|
||||
if ((b > 0) && (b <= 8)) {
|
||||
if ((b > 0) && (b <= 8))
|
||||
{
|
||||
if (ioctl(fd, IOC_FP_LED_CTRL, b | 0x80))
|
||||
perror("IOC_FP_LED_CTRL");
|
||||
}
|
||||
}
|
||||
else if (sscanf(argv[x], "-lc%X", &b) == 1)
|
||||
{
|
||||
if ((b > 0) && (b <= 8)) {
|
||||
if ((b > 0) && (b <= 8))
|
||||
{
|
||||
if (ioctl(fd, IOC_FP_LED_CTRL, b))
|
||||
perror("IOC_FP_LED_CTRL");
|
||||
}
|
||||
@@ -146,7 +151,8 @@ int main(int argc, char **argv)
|
||||
fp_standby_cmd_data_t pwr;
|
||||
pwr.addr = 0;
|
||||
pwr.cmd = b;
|
||||
printf("standby command: %x\n", pwr.cmd);fflush(stdout);
|
||||
printf("standby command: %x\n", pwr.cmd);
|
||||
fflush(stdout);
|
||||
|
||||
if (ioctl(fd, IOC_FP_STANDBY_CMD, &pwr))
|
||||
perror("IOC_FP_STANDBY_CMD");
|
||||
|
Reference in New Issue
Block a user