/alps/fastwriter

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/fastwriter

« back to all changes in this revision

Viewing changes to sysinfo.c

  • Committer: Suren A. Chilingaryan
  • Date: 2016-03-04 15:45:54 UTC
  • Revision ID: csa@suren.me-20160304154554-na5g6icyed8p296p
RPM support

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    if ((fd = open(filename, O_RDONLY)) == -1) {                \
27
27
        fputs(BAD_OPEN_MESSAGE, stderr);                        \
28
28
        fflush(NULL);                                           \
29
 
        _exit(102);                                             \
 
29
        return -102;                                            \
30
30
    }                                                           \
31
31
    lseek(fd, 0L, SEEK_SET);                                    \
32
32
    if ((local_n = read(fd, buf, sizeof buf - 1)) < 0) {        \
33
33
        perror(filename);                                       \
34
34
        fflush(NULL);                                           \
35
 
        _exit(103);                                             \
 
35
        return -103;                                            \
36
36
    }                                                           \
37
37
    buf[local_n] = '\0';                                        \
38
38
    close(fd);                                                  \