aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-25 20:30:24 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-25 20:30:24 +0000
commit394eebed6656dfc2e56a79500b602023000ac415 (patch)
treeb5b5858663e7333b9624cb4f329e91ae649f3247 /include
parent38b8831b3201a9e44cfb156b5b8577e4f5e8d761 (diff)
downloadbusybox-w32-394eebed6656dfc2e56a79500b602023000ac415.tar.gz
busybox-w32-394eebed6656dfc2e56a79500b602023000ac415.tar.bz2
busybox-w32-394eebed6656dfc2e56a79500b602023000ac415.zip
lpd: spool mode added by Vladimir
lpr: more robust error reporting *: introduce and use xchroot libbb: full_read/write now will report partial data counts prior to error isdirectory.c: style fixes lpd_main 249 486 +237 xchroot - 29 +29 get_response_or_say_and_die 110 139 +29 full_write 52 60 +8 full_read 55 63 +8 static.newline 1 - -1 switch_root_main 404 400 -4 chpst_main 1089 1079 -10 getopt32 1370 1359 -11 chroot_main 115 101 -14 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 4/4 up/down: 311/-40) Total: 271 bytes text data bss dec hex filename 798472 728 7484 806684 c4f1c busybox_old 798775 728 7484 806987 c504b busybox_unstripped
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h5
-rw-r--r--include/usage.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 48937c4b1..1ea2e35be 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -315,6 +315,7 @@ void kill_myself_with_sig(int sig) ATTRIBUTE_NORETURN;
315void xsetgid(gid_t gid); 315void xsetgid(gid_t gid);
316void xsetuid(uid_t uid); 316void xsetuid(uid_t uid);
317void xchdir(const char *path); 317void xchdir(const char *path);
318void xchroot(const char *path);
318void xsetenv(const char *key, const char *value); 319void xsetenv(const char *key, const char *value);
319void xunlink(const char *pathname); 320void xunlink(const char *pathname);
320void xstat(const char *pathname, struct stat *buf); 321void xstat(const char *pathname, struct stat *buf);
@@ -500,6 +501,8 @@ extern void *xrealloc(void *old, size_t size);
500 501
501extern ssize_t safe_read(int fd, void *buf, size_t count); 502extern ssize_t safe_read(int fd, void *buf, size_t count);
502extern ssize_t nonblock_safe_read(int fd, void *buf, size_t count); 503extern ssize_t nonblock_safe_read(int fd, void *buf, size_t count);
504// NB: will return short read on error, not -1,
505// if some data was read before error occurred
503extern ssize_t full_read(int fd, void *buf, size_t count); 506extern ssize_t full_read(int fd, void *buf, size_t count);
504extern void xread(int fd, void *buf, size_t count); 507extern void xread(int fd, void *buf, size_t count);
505extern unsigned char xread_char(int fd); 508extern unsigned char xread_char(int fd);
@@ -514,6 +517,8 @@ extern ssize_t open_read_close(const char *filename, void *buf, size_t count);
514extern void *xmalloc_open_read_close(const char *filename, size_t *sizep); 517extern void *xmalloc_open_read_close(const char *filename, size_t *sizep);
515 518
516extern ssize_t safe_write(int fd, const void *buf, size_t count); 519extern ssize_t safe_write(int fd, const void *buf, size_t count);
520// NB: will return short write on error, not -1,
521// if some data was written before error occurred
517extern ssize_t full_write(int fd, const void *buf, size_t count); 522extern ssize_t full_write(int fd, const void *buf, size_t count);
518extern void xwrite(int fd, const void *buf, size_t count); 523extern void xwrite(int fd, const void *buf, size_t count);
519 524
diff --git a/include/usage.h b/include/usage.h
index 7c9a90e77..359f88d27 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -2055,7 +2055,7 @@ USE_FEATURE_BRCTL_FANCY("\n" \
2055 "SPOOLDIR" 2055 "SPOOLDIR"
2056#define lpd_full_usage \ 2056#define lpd_full_usage \
2057 "Example:" \ 2057 "Example:" \
2058 "\n tcpsvd -E localhost 515 lpd /var/spool" 2058 "\n tcpsvd -E 0 515 softlimit -m 99999 lpd /var/spool"
2059 2059
2060#define lpq_trivial_usage \ 2060#define lpq_trivial_usage \
2061 "[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID...] [-fs]" 2061 "[-P queue[@host[:port]]] [-U USERNAME] [-d JOBID...] [-fs]"