Merge branch 'master' into recurse
This commit is contained in:
commit
e9d6683402
@ -1574,7 +1574,7 @@
|
||||
USB device interfaces that do not yet have boardctl() commands
|
||||
(2016-03-25).
|
||||
|
||||
7.16 2016-xx-xx Gregory Nutt <gnutt@nuttx.org>
|
||||
7.16 2016-06-01 Gregory Nutt <gnutt@nuttx.org>
|
||||
|
||||
* apps/system/sdcard: Remove the SD card application. This
|
||||
application violates OS/application interface rules and has been
|
||||
@ -1605,3 +1605,4 @@
|
||||
path by providing an alternal path on the command line. From Sébastien
|
||||
Lorquet (2016-06-01).
|
||||
|
||||
7.17 2016-xx-xx Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -279,6 +279,7 @@ int alarm_main(int argc, FAR char *argv[])
|
||||
/* Open the RTC driver */
|
||||
|
||||
printf("Opening %s\n", CONFIG_EXAMPLES_ALARM_DEVPATH);
|
||||
|
||||
fd = open(CONFIG_EXAMPLES_ALARM_DEVPATH, O_WRONLY);
|
||||
if (fd < 0)
|
||||
{
|
||||
@ -297,17 +298,20 @@ int alarm_main(int argc, FAR char *argv[])
|
||||
|
||||
setrel.sigvalue.sival_int = alarmid;
|
||||
|
||||
fd = ioctl(fd, RTC_SET_RELATIVE, (unsigned long)((uintptr_t)&setrel));
|
||||
if (fd < 0)
|
||||
ret = ioctl(fd, RTC_SET_RELATIVE, (unsigned long)((uintptr_t)&setrel));
|
||||
if (ret < 0)
|
||||
{
|
||||
int errcode = errno;
|
||||
|
||||
fprintf(stderr, "ERROR: RTC_SET_RELATIVE ioctl failed: %d\n",
|
||||
errcode);
|
||||
|
||||
(void)close(fd);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
printf("Alarm set in %lu seconds\n", seconds);
|
||||
printf("Alarm %d set in %lu seconds\n", alarmid, seconds);
|
||||
|
||||
(void)close(fd);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user