/[smecontribs]/rpms/watchdog/contribs7/watchdog-5.6-quiet-write-warnings.patch
ViewVC logotype

Annotation of /rpms/watchdog/contribs7/watchdog-5.6-quiet-write-warnings.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Sat Dec 4 16:27:03 2010 UTC (13 years, 11 months ago) by slords
Branch: MAIN
Initial import

1 slords 1.1 diff -ur watchdog-5.6/src/shutdown.c watchdog-5.6-cleanup/src/shutdown.c
2     --- watchdog-5.6/src/shutdown.c 2009-03-21 19:08:53.000000000 +0000
3     +++ watchdog-5.6-cleanup/src/shutdown.c 2009-03-26 10:10:57.000000000 +0000
4     @@ -446,6 +446,8 @@
5     (void) killall5(SIGKILL);
6     keep_alive();
7    
8     + ssize_t write_len;
9     +
10     /* Record the fact that we're going down */
11     if ((fd = open(_PATH_WTMP, O_WRONLY | O_APPEND)) >= 0) {
12     time_t t;
13     @@ -458,7 +460,7 @@
14     wtmp.ut_pid = 0;
15     wtmp.ut_type = RUN_LVL;
16     wtmp.ut_time = t;
17     - write(fd, (char *) &wtmp, sizeof(wtmp));
18     + write_len = write(fd, (char *) &wtmp, sizeof(wtmp));
19     close(fd);
20     }
21    
22     @@ -474,7 +476,7 @@
23     char buf[512];
24    
25     if (read(fd_seed, buf, 512) == 512)
26     - write(fd_bck, buf, 512);
27     + write_len = write(fd_bck, buf, 512);
28     close(fd_bck);
29     }
30     close(fd_seed);

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed