Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/coreutils/cksum.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 4  Line 4 
4   *   *
5   * Copyright (C) 2006 by Rob Sullivan, with ideas from code by Walter Harms   * Copyright (C) 2006 by Rob Sullivan, with ideas from code by Walter Harms
6   *   *
7   * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */   * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
8     */
9  #include "libbb.h"  #include "libbb.h"
10    
11  int cksum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;  int cksum_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
# Line 15  int cksum_main(int argc UNUSED_PARAM, ch Line 15  int cksum_main(int argc UNUSED_PARAM, ch
15   uint32_t crc;   uint32_t crc;
16   off_t length, filesize;   off_t length, filesize;
17   int bytes_read;   int bytes_read;
18     int exit_code = EXIT_SUCCESS;
19   uint8_t *cp;   uint8_t *cp;
20    
21  #if ENABLE_DESKTOP  #if ENABLE_DESKTOP
# Line 27  int cksum_main(int argc UNUSED_PARAM, ch Line 28  int cksum_main(int argc UNUSED_PARAM, ch
28   do {   do {
29   int fd = open_or_warn_stdin(*argv ? *argv : bb_msg_standard_input);   int fd = open_or_warn_stdin(*argv ? *argv : bb_msg_standard_input);
30    
31   if (fd < 0)   if (fd < 0) {
32     exit_code = EXIT_FAILURE;
33   continue;   continue;
34     }
35   crc = 0;   crc = 0;
36   length = 0;   length = 0;
37    
# Line 60  int cksum_main(int argc UNUSED_PARAM, ch Line 63  int cksum_main(int argc UNUSED_PARAM, ch
63   crc, filesize, *argv);   crc, filesize, *argv);
64   } while (*argv && *++argv);   } while (*argv && *++argv);
65    
66   fflush_stdout_and_exit(EXIT_SUCCESS);   fflush_stdout_and_exit(exit_code);
67  }  }

Legend:
Removed from v.983  
changed lines
  Added in v.984