My latest ramblings.
-Erik
This commit is contained in:
@@ -62,7 +62,7 @@
|
||||
#define CMD_ALL 11
|
||||
#define CMD_INFO 12
|
||||
|
||||
#ifdef BB_FBSET_FANCY
|
||||
#ifdef BB_FEATURE_FBSET_FANCY
|
||||
#define CMD_XRES 13
|
||||
#define CMD_YRES 14
|
||||
#define CMD_VXRES 15
|
||||
@@ -105,7 +105,7 @@ struct cmdoptions_t {
|
||||
"-vsync", 1, CMD_VSYNC}, {
|
||||
"-laced", 1, CMD_LACED}, {
|
||||
"-double", 1, CMD_DOUBLE},
|
||||
#ifdef BB_FBSET_FANCY
|
||||
#ifdef BB_FEATURE_FBSET_FANCY
|
||||
{
|
||||
"--help", 0, CMD_HELP}, {
|
||||
"-all", 0, CMD_ALL}, {
|
||||
@@ -164,8 +164,7 @@ static int readmode(struct fb_var_screeninfo *base, const char *fn,
|
||||
}
|
||||
}
|
||||
#else
|
||||
fprintf(stderr,
|
||||
"W: mode reading was disabled on this copy of fbset; ignoring request\n");
|
||||
errorMsg( "mode reading not compiled in\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@@ -199,7 +198,7 @@ static void showmode(struct fb_var_screeninfo *v)
|
||||
v->vsync_len);
|
||||
}
|
||||
printf("\nmode \"%ux%u-%u\"\n", v->xres, v->yres, (int) (vrate + 0.5));
|
||||
#ifdef BB_FBSET_FANCY
|
||||
#ifdef BB_FEATURE_FBSET_FANCY
|
||||
printf("\t# D: %.3f MHz, H: %.3f kHz, V: %.3f Hz\n", drate / 1e6,
|
||||
hrate / 1e3, vrate);
|
||||
#endif
|
||||
@@ -283,7 +282,7 @@ extern int fbset_main(int argc, char **argv)
|
||||
varset.hsync_len = strtoul(argv[6], 0, 0);
|
||||
varset.vsync_len = strtoul(argv[7], 0, 0);
|
||||
break;
|
||||
#ifdef BB_FBSET_FANCY
|
||||
#ifdef BB_FEATURE_FBSET_FANCY
|
||||
case CMD_XRES:
|
||||
varset.xres = strtoul(argv[1], 0, 0);
|
||||
break;
|
||||
@@ -323,7 +322,8 @@ extern int fbset_main(int argc, char **argv)
|
||||
if (ioctl(fh, FBIOPUT_VSCREENINFO, &var))
|
||||
PERROR("fbset(ioctl)");
|
||||
showmode(&var);
|
||||
close(fh);
|
||||
/* Don't close the file, as exiting will take care of that */
|
||||
/* close(fh); */
|
||||
|
||||
return (TRUE);
|
||||
exit (TRUE);
|
||||
}
|
||||
|
@@ -44,7 +44,9 @@ extern int fdflush_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
value = ioctl(fd, FDFLUSH, 0);
|
||||
close(fd);
|
||||
/* Don't bother closing. Exit does
|
||||
* that, so we can save a few bytes */
|
||||
/* close(fd); */
|
||||
|
||||
if (value) {
|
||||
perror(*argv);
|
||||
|
@@ -55,7 +55,9 @@ freeramdisk_main(int argc, char **argv)
|
||||
if (ioctl(f, BLKFLSBUF) < 0) {
|
||||
fatalError( "freeramdisk: failed ioctl on %s: %s", rname, strerror(errno));
|
||||
}
|
||||
close(f);
|
||||
/* Don't bother closing. Exit does
|
||||
* that, so we can save a few bytes */
|
||||
/* close(f); */
|
||||
exit(TRUE);
|
||||
}
|
||||
|
||||
|
@@ -1242,6 +1242,7 @@ static void alloc_name_list(void)
|
||||
name_list[i] = xmalloc(sizeof(char) * PATH_MAX + 1);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* execute this atexit() to deallocate name_list[] */
|
||||
/* piptigger was here */
|
||||
static void free_name_list(void)
|
||||
@@ -1257,6 +1258,7 @@ static void free_name_list(void)
|
||||
free(name_list);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
extern int fsck_minix_main(int argc, char **argv)
|
||||
{
|
||||
@@ -1265,7 +1267,9 @@ extern int fsck_minix_main(int argc, char **argv)
|
||||
int retcode = 0;
|
||||
|
||||
alloc_name_list();
|
||||
atexit(free_name_list);
|
||||
/* Don't bother to free memory. Exit does
|
||||
* that automagically, so we can save a few bytes */
|
||||
//atexit(free_name_list);
|
||||
|
||||
if (argc && *argv)
|
||||
program_name = *argv;
|
||||
|
@@ -348,8 +348,12 @@ extern int mount_main(int argc, char **argv)
|
||||
mntentlist[i].mnt_opts, mntentlist[i].mnt_freq,
|
||||
mntentlist[i].mnt_passno);
|
||||
}
|
||||
/* Don't bother to close files or free memory. Exit
|
||||
* does that automagically, so we can save a few bytes */
|
||||
#if 0
|
||||
free( mntentlist);
|
||||
close(fd);
|
||||
#endif
|
||||
exit(TRUE);
|
||||
}
|
||||
#else
|
||||
|
@@ -145,6 +145,9 @@ char *mtab_next(void **iter)
|
||||
return mp;
|
||||
}
|
||||
|
||||
/* Don't bother to clean up, since exit() does that
|
||||
* automagically, so we can save a few bytes */
|
||||
#if 0
|
||||
void mtab_free(void)
|
||||
{
|
||||
struct _mtab_entry_t *this, *next;
|
||||
@@ -160,6 +163,7 @@ void mtab_free(void)
|
||||
this = next;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static int do_umount(const char *name, int useMtab)
|
||||
{
|
||||
|
Reference in New Issue
Block a user