Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/printutils/lpd.c


Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/printutils/lpd.c

    r3232 r3621  
    7070 * mv -f ./"$DATAFILE" save/
    7171 */
     72//config:config LPD
     73//config:   bool "lpd"
     74//config:   default y
     75//config:   help
     76//config:     lpd is a print spooling daemon.
     77
     78//applet:IF_LPD(APPLET(lpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
     79
     80//kbuild:lib-$(CONFIG_LPD) += lpd.o
    7281
    7382//usage:#define lpd_trivial_usage
     
    201210            goto unsupported_cmd;
    202211        if (spooling & (1 << (s[0]-1))) {
    203             printf("Duplicated subcommand\n");
     212            puts("Duplicated subcommand");
    204213            goto err_exit;
    205214        }
    206215        // get filename
    207         *strchrnul(s, '\n') = '\0';
     216        chomp(s);
    208217        fname = strchr(s, ' ');
    209218        if (!fname) {
    210219// bad_fname:
    211             printf("No or bad filename\n");
     220            puts("No or bad filename");
    212221            goto err_exit;
    213222        }
     
    220229        expected_len = bb_strtou(s + 1, NULL, 10);
    221230        if (errno || expected_len < 0) {
    222             printf("Bad length\n");
     231            puts("Bad length");
    223232            goto err_exit;
    224233        }
     
    226235            // SECURITY:
    227236            // ctrlfile can't be big (we want to read it back later!)
    228             printf("File is too big\n");
     237            puts("File is too big");
    229238            goto err_exit;
    230239        }
Note: See TracChangeset for help on using the changeset viewer.