aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-04-06 05:17:57 +0000
committerEric Andersen <andersen@codepoet.org>2002-04-06 05:17:57 +0000
commitfcffa2cc1a0f11ea6a075dd37762ca5b543b55e1 (patch)
treeb692176a654613bb68ca37c42f88201aeb48d8ba /util-linux
parent50e4d660ace54d8da2cb09d537138447a92c68bd (diff)
downloadbusybox-w32-fcffa2cc1a0f11ea6a075dd37762ca5b543b55e1.tar.gz
busybox-w32-fcffa2cc1a0f11ea6a075dd37762ca5b543b55e1.tar.bz2
busybox-w32-fcffa2cc1a0f11ea6a075dd37762ca5b543b55e1.zip
Apply lash_patch35 from vodz, which brings several nice size_optimizations.
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mkswap.c8
-rw-r--r--util-linux/mount.c3
2 files changed, 5 insertions, 6 deletions
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index c773ecef9..de10ba71f 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -81,7 +81,7 @@ static struct swap_header_v1 {
81 unsigned int badpages[1]; 81 unsigned int badpages[1];
82} *p; 82} *p;
83 83
84static void init_signature_page(void) 84static inline void init_signature_page(void)
85{ 85{
86 pagesize = getpagesize(); 86 pagesize = getpagesize();
87 87
@@ -94,7 +94,7 @@ static void init_signature_page(void)
94 p = (struct swap_header_v1 *) signature_page; 94 p = (struct swap_header_v1 *) signature_page;
95} 95}
96 96
97static void write_signature(char *sig) 97static inline void write_signature(char *sig)
98{ 98{
99 char *sp = (char *) signature_page; 99 char *sp = (char *) signature_page;
100 100
@@ -147,7 +147,7 @@ It is roughly 2GB on i386, PPC, m68k, ARM, 1GB on sparc, 512MB on mips,
147 147
148#define MAX_BADPAGES ((pagesize-1024-128*sizeof(int)-10)/sizeof(int)) 148#define MAX_BADPAGES ((pagesize-1024-128*sizeof(int)-10)/sizeof(int))
149 149
150static void bit_set(unsigned int *addr, unsigned int nr) 150static inline void bit_set(unsigned int *addr, unsigned int nr)
151{ 151{
152 unsigned int r, m; 152 unsigned int r, m;
153 153
@@ -179,7 +179,7 @@ static void page_ok(int page)
179 bit_set(signature_page, page); 179 bit_set(signature_page, page);
180} 180}
181 181
182static void page_bad(int page) 182static inline void page_bad(int page)
183{ 183{
184 if (version == 0) 184 if (version == 0)
185 bit_test_and_clear(signature_page, page); 185 bit_test_and_clear(signature_page, page);
diff --git a/util-linux/mount.c b/util-linux/mount.c
index ae4417cb8..74ce4e116 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -469,9 +469,8 @@ singlemount:
469 string_flags = xstrdup(string_flags); 469 string_flags = xstrdup(string_flags);
470 rc = EXIT_SUCCESS; 470 rc = EXIT_SUCCESS;
471#ifdef CONFIG_NFSMOUNT 471#ifdef CONFIG_NFSMOUNT
472 if (strchr(device, ':') != NULL) 472 if (strchr(device, ':') != NULL) {
473 filesystemType = "nfs"; 473 filesystemType = "nfs";
474 if (strcmp(filesystemType, "nfs") == 0) {
475 if (nfsmount (device, directory, &flags, &extra_opts, 474 if (nfsmount (device, directory, &flags, &extra_opts,
476 &string_flags, 1)) { 475 &string_flags, 1)) {
477 perror_msg("nfsmount failed"); 476 perror_msg("nfsmount failed");