# HG changeset patch # User Markus Bröker # Date 1290160103 -3600 # Node ID 2898369b1cdce6245ee37abb1c2409f1af58eb5c # Parent a54dcc86addbc4e97eb9bbc69c6c4c9cd8216aaa check for the linux-specific proc filesystem... committer: Markus Bröker diff --git a/sts.c b/sts.c --- a/sts.c +++ b/sts.c @@ -34,6 +34,10 @@ time_t now = time (NULL); FILE *f = fopen ("/proc/uptime", "r"); + if (f == NULL) { + perror ("FOPEN"); + return EXIT_FAILURE; + } if (fgets (buf, sizeof (buf), f) == NULL) { perror ("FOPEN"); exit (errno);