Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
This commit is contained in:
@ -8,15 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "busybox.h"
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <utmp.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifndef SHUTDOWN_TIME
|
||||
# define SHUTDOWN_TIME 254
|
||||
@ -43,7 +35,7 @@ int last_main(int argc, char **argv)
|
||||
if (argc > 1) {
|
||||
bb_show_usage();
|
||||
}
|
||||
file = bb_xopen(bb_path_wtmp_file, O_RDONLY);
|
||||
file = xopen(bb_path_wtmp_file, O_RDONLY);
|
||||
|
||||
printf("%-10s %-14s %-18s %-12.12s %s\n", "USER", "TTY", "HOST", "LOGIN", "TIME");
|
||||
while ((n = safe_read(file, (void*)&ut, sizeof(struct utmp))) != 0) {
|
||||
|
Reference in New Issue
Block a user