whitespace fixes. no code changes
This commit is contained in:
parent
5d89fbaa2e
commit
1f228985b2
@ -60,7 +60,7 @@ static int get_vt_fd(void)
|
|||||||
/* Do we, by chance, already have it? */
|
/* Do we, by chance, already have it? */
|
||||||
for (fd = 0; fd < 3; fd++)
|
for (fd = 0; fd < 3; fd++)
|
||||||
if (!not_vt_fd(fd))
|
if (!not_vt_fd(fd))
|
||||||
return fd;
|
return fd;
|
||||||
/* _only_ O_NONBLOCK: ask for neither read not write perms */
|
/* _only_ O_NONBLOCK: ask for neither read not write perms */
|
||||||
fd = open(DEV_CONSOLE, O_NONBLOCK);
|
fd = open(DEV_CONSOLE, O_NONBLOCK);
|
||||||
if (fd >= 0 && !not_vt_fd(fd))
|
if (fd >= 0 && !not_vt_fd(fd))
|
||||||
@ -73,7 +73,7 @@ static int find_free_vtno(void)
|
|||||||
int vtno;
|
int vtno;
|
||||||
int fd = get_vt_fd();
|
int fd = get_vt_fd();
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
/*xfunc_error_retval = 3; - do we need compat? */
|
/*xfunc_error_retval = 3; - do we need compat? */
|
||||||
if (ioctl(fd, VT_OPENQRY, &vtno) != 0 || vtno <= 0)
|
if (ioctl(fd, VT_OPENQRY, &vtno) != 0 || vtno <= 0)
|
||||||
bb_perror_msg_and_die("can't find open VT");
|
bb_perror_msg_and_die("can't find open VT");
|
||||||
@ -138,7 +138,7 @@ int openvt_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
|||||||
close(0);
|
close(0);
|
||||||
/*setsid(); - BAD IDEA: after we exit, child is SIGHUPed... */
|
/*setsid(); - BAD IDEA: after we exit, child is SIGHUPed... */
|
||||||
xopen(vtname, O_RDWR);
|
xopen(vtname, O_RDWR);
|
||||||
xioctl(0, VT_GETSTATE, &vtstat);
|
xioctl(0, VT_GETSTATE, &vtstat);
|
||||||
|
|
||||||
if (flags & OPT_s) {
|
if (flags & OPT_s) {
|
||||||
xioctl(0, VT_ACTIVATE, (void*)(ptrdiff_t)vtno);
|
xioctl(0, VT_ACTIVATE, (void*)(ptrdiff_t)vtno);
|
||||||
|
@ -109,7 +109,7 @@ int mv_main(int argc, char **argv)
|
|||||||
goto RET_1;
|
goto RET_1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* FILEUTILS_RECUR also prevents nasties like
|
/* FILEUTILS_RECUR also prevents nasties like
|
||||||
* "read from device and write contents to dst"
|
* "read from device and write contents to dst"
|
||||||
* instead of "create same device node" */
|
* instead of "create same device node" */
|
||||||
copy_flag = FILEUTILS_RECUR | FILEUTILS_PRESERVE_STATUS;
|
copy_flag = FILEUTILS_RECUR | FILEUTILS_PRESERVE_STATUS;
|
||||||
|
@ -142,18 +142,18 @@ static void do_procinit(void)
|
|||||||
procdir = xopendir("/proc");
|
procdir = xopendir("/proc");
|
||||||
|
|
||||||
pid = 0;
|
pid = 0;
|
||||||
while(1) {
|
while(1) {
|
||||||
errno = 0; /* clear any previous error */
|
errno = 0; /* clear any previous error */
|
||||||
entry = readdir(procdir);
|
entry = readdir(procdir);
|
||||||
// TODO: check for exact errno(s) which mean that we got stale entry
|
// TODO: check for exact errno(s) which mean that we got stale entry
|
||||||
if (errno) /* Stale entry, process has died after opendir */
|
if (errno) /* Stale entry, process has died after opendir */
|
||||||
continue;
|
continue;
|
||||||
if (!entry) /* EOF, no more entries */
|
if (!entry) /* EOF, no more entries */
|
||||||
break;
|
break;
|
||||||
pid = bb_strtou(entry->d_name, NULL, 10);
|
pid = bb_strtou(entry->d_name, NULL, 10);
|
||||||
if (errno) /* NaN */
|
if (errno) /* NaN */
|
||||||
continue;
|
continue;
|
||||||
check(pid);
|
check(pid);
|
||||||
}
|
}
|
||||||
closedir(procdir);
|
closedir(procdir);
|
||||||
if (!pid)
|
if (!pid)
|
||||||
|
@ -231,7 +231,7 @@ USE_LSATTR(APPLET(lsattr, _BB_DIR_BIN, _BB_SUID_NEVER))
|
|||||||
USE_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
|
USE_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_NEVER))
|
||||||
USE_UNLZMA(APPLET_ODDNAME(lzmacat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lzmacat))
|
USE_UNLZMA(APPLET_ODDNAME(lzmacat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lzmacat))
|
||||||
USE_MAKEDEVS(APPLET(makedevs, _BB_DIR_SBIN, _BB_SUID_NEVER))
|
USE_MAKEDEVS(APPLET(makedevs, _BB_DIR_SBIN, _BB_SUID_NEVER))
|
||||||
USE_MAN(APPLET(man, _BB_DIR_SBIN, _BB_SUID_NEVER))
|
USE_MAN(APPLET(man, _BB_DIR_SBIN, _BB_SUID_NEVER))
|
||||||
USE_MATCHPATHCON(APPLET(matchpathcon, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
|
USE_MATCHPATHCON(APPLET(matchpathcon, _BB_DIR_USR_SBIN, _BB_SUID_NEVER))
|
||||||
USE_MD5SUM(APPLET_ODDNAME(md5sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, md5sum))
|
USE_MD5SUM(APPLET_ODDNAME(md5sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, md5sum))
|
||||||
USE_MDEV(APPLET(mdev, _BB_DIR_SBIN, _BB_SUID_NEVER))
|
USE_MDEV(APPLET(mdev, _BB_DIR_SBIN, _BB_SUID_NEVER))
|
||||||
|
@ -521,7 +521,7 @@
|
|||||||
|
|
||||||
#define cpio_trivial_usage \
|
#define cpio_trivial_usage \
|
||||||
"-[dim" USE_FEATURE_CPIO_O("o") "tuv][F cpiofile]" \
|
"-[dim" USE_FEATURE_CPIO_O("o") "tuv][F cpiofile]" \
|
||||||
USE_FEATURE_CPIO_O( "[H newc]" )
|
USE_FEATURE_CPIO_O( "[H newc]" )
|
||||||
#define cpio_full_usage "\n\n" \
|
#define cpio_full_usage "\n\n" \
|
||||||
"Extract or list files from a cpio archive" \
|
"Extract or list files from a cpio archive" \
|
||||||
USE_FEATURE_CPIO_O( ", or create a cpio archive" ) \
|
USE_FEATURE_CPIO_O( ", or create a cpio archive" ) \
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
* - use kernel option 'vga=xxx' or otherwise enable framebuffer device.
|
* - use kernel option 'vga=xxx' or otherwise enable framebuffer device.
|
||||||
* - put somewhere fbsplash.cfg file and an image in .ppm format.
|
* - put somewhere fbsplash.cfg file and an image in .ppm format.
|
||||||
* - run applet: $ setsid fbsplash [params] &
|
* - run applet: $ setsid fbsplash [params] &
|
||||||
* -c: hide cursor
|
* -c: hide cursor
|
||||||
* -d /dev/fbN: framebuffer device (if not /dev/fb0)
|
* -d /dev/fbN: framebuffer device (if not /dev/fb0)
|
||||||
* -s path_to_image_file (can be "-" for stdin)
|
* -s path_to_image_file (can be "-" for stdin)
|
||||||
* -i path_to_cfg_file
|
* -i path_to_cfg_file
|
||||||
* -f path_to_fifo (can be "-" for stdin)
|
* -f path_to_fifo (can be "-" for stdin)
|
||||||
* - if you want to run it only in presence of a kernel parameter
|
* - if you want to run it only in presence of a kernel parameter
|
||||||
* (for example fbsplash=on), use:
|
* (for example fbsplash=on), use:
|
||||||
* grep -q "fbsplash=on" </proc/cmdline && setsid fbsplash [params]
|
* grep -q "fbsplash=on" </proc/cmdline && setsid fbsplash [params]
|
||||||
@ -147,7 +147,7 @@ static void fb_drawfullrectangle(int nx1pos, int ny1pos, int nx2pos, int ny2pos,
|
|||||||
ngreen >>= 2; // 6-bit green
|
ngreen >>= 2; // 6-bit green
|
||||||
nblue >>= 3; // 5-bit blue
|
nblue >>= 3; // 5-bit blue
|
||||||
thispix = nblue + (ngreen << 5) + (nred << (5+6));
|
thispix = nblue + (ngreen << 5) + (nred << (5+6));
|
||||||
|
|
||||||
cnt1 = ny2pos - ny1pos;
|
cnt1 = ny2pos - ny1pos;
|
||||||
nypos = ny1pos;
|
nypos = ny1pos;
|
||||||
do {
|
do {
|
||||||
@ -156,7 +156,7 @@ static void fb_drawfullrectangle(int nx1pos, int ny1pos, int nx2pos, int ny2pos,
|
|||||||
do {
|
do {
|
||||||
*ptr++ = thispix;
|
*ptr++ = thispix;
|
||||||
} while (--cnt2 >= 0);
|
} while (--cnt2 >= 0);
|
||||||
|
|
||||||
nypos++;
|
nypos++;
|
||||||
} while (--cnt1 >= 0);
|
} while (--cnt1 >= 0);
|
||||||
}
|
}
|
||||||
@ -342,7 +342,7 @@ static void init(const char *cfg_filename)
|
|||||||
case 7:
|
case 7:
|
||||||
G.bdebug_messages = val;
|
G.bdebug_messages = val;
|
||||||
if (G.bdebug_messages)
|
if (G.bdebug_messages)
|
||||||
G.logfile_fd = xfopen("/tmp/fbsplash.log", "w");
|
G.logfile_fd = xfopen("/tmp/fbsplash.log", "w");
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
err:
|
err:
|
||||||
|
@ -82,7 +82,7 @@ int man_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
|||||||
|
|
||||||
sec_list = xstrdup("1:2:3:4:5:6:7:8:9");
|
sec_list = xstrdup("1:2:3:4:5:6:7:8:9");
|
||||||
alloc_mp = 10;
|
alloc_mp = 10;
|
||||||
man_path_list = xmalloc(10 * sizeof(man_path_list[0]));
|
man_path_list = xmalloc(10 * sizeof(man_path_list[0]));
|
||||||
count_mp = 0;
|
count_mp = 0;
|
||||||
man_path_list[0] = xstrdup(getenv("MANPATH"));
|
man_path_list[0] = xstrdup(getenv("MANPATH"));
|
||||||
if (man_path_list[0])
|
if (man_path_list[0])
|
||||||
@ -137,8 +137,8 @@ int man_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
|||||||
|
|
||||||
char *man_filename = xasprintf("%.*s/man%.*s/%s.%.*s" ".bz2",
|
char *man_filename = xasprintf("%.*s/man%.*s/%s.%.*s" ".bz2",
|
||||||
path_len, cur_path,
|
path_len, cur_path,
|
||||||
sect_len, cur_sect,
|
sect_len, cur_sect,
|
||||||
*argv,
|
*argv,
|
||||||
sect_len, cur_sect);
|
sect_len, cur_sect);
|
||||||
int found = show_manpage(pager, man_filename);
|
int found = show_manpage(pager, man_filename);
|
||||||
free(man_filename);
|
free(man_filename);
|
||||||
|
@ -532,7 +532,7 @@ config FEATURE_VOLUMEID_SYSV
|
|||||||
### depends on VOLUMEID
|
### depends on VOLUMEID
|
||||||
### help
|
### help
|
||||||
### TODO
|
### TODO
|
||||||
###
|
###
|
||||||
### config FEATURE_VOLUMEID_MSDOS
|
### config FEATURE_VOLUMEID_MSDOS
|
||||||
### bool "msdos filesystem"
|
### bool "msdos filesystem"
|
||||||
### default n
|
### default n
|
||||||
|
@ -171,7 +171,7 @@ static void make_device(char *path, int delete)
|
|||||||
s = val;
|
s = val;
|
||||||
while (*s && *s++ == '%')
|
while (*s && *s++ == '%')
|
||||||
n++;
|
n++;
|
||||||
|
|
||||||
p = alias = xzalloc(strlen(val) + n * strlen(device_name));
|
p = alias = xzalloc(strlen(val) + n * strlen(device_name));
|
||||||
s = val + 1;
|
s = val + 1;
|
||||||
while (*s) {
|
while (*s) {
|
||||||
|
Loading…
Reference in New Issue
Block a user