← Commit list

7b363fd3c

Rob Landley
Rob Landley
2005-12-20
SOURCE BUG Duration: 9s

Subject

Some minor cleanups/bugfixes split off from the big remount work: Shorten GPL boilerplate. Enabling FEATURE_CLEAN_UP broke things in two places. Move the NFS with uClibc check to nfsmount.c

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/mount.c+8 -27
@@ -6,20 +6,7 @@
* Copyright (C) 1999-2004 by Erik Andersen <[email protected]>
* Copyright (C) 2005 by Rob Landley <[email protected]>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
#include <limits.h>
@@ -35,12 +22,6 @@
#include <sys/ioctl.h> // for CONFIG_FEATURE_MOUNT_LOOP
#include "busybox.h"
-/* This is just a warning of a common mistake. Possibly this should be a
- * uclibc faq entry rather than in busybox... */
-#if ENABLE_FEATURE_MOUNT_NFS && defined(__UCLIBC__) && ! defined(__UCLIBC_HAS_RPC__)
-#error "You need to build uClibc with UCLIBC_HAS_RPC for busybox mount with NFS support to compile."
-#endif
-
// These two aren't always defined in old headers
#ifndef MS_BIND
#define MS_BIND 4096
@@ -182,7 +163,7 @@ extern int mount_main(int argc, char **argv)
while (getmntent_r(mountTable,&m,path,sizeof(path))) {
blockDevice = m.mnt_fsname;
- // Clean up display a little bit regarding root devie
+ // Clean up display a little bit regarding root device
if(!strcmp(blockDevice, "rootfs")) continue;
if(!strcmp(blockDevice, "/dev/root"))
blockDevice = find_block_device("/");
@@ -260,7 +241,7 @@ extern int mount_main(int argc, char **argv)
free(blockDevice);
blockDevice=strdup(m.mnt_fsname);
free(directory);
- directory=strdup(m.mnt_type);
+ directory=strdup(m.mnt_dir);
} else {
blockDevice=m.mnt_fsname;
directory=m.mnt_dir;
@@ -387,16 +368,16 @@ mount_it_now:
bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
}
// We couldn't free this earlier becase fsType could be in buf.
- if(ENABLE_FEATURE_CLEAN_UP) {
- free(buf);
- free(blockDevice);
- free(directory);
- }
+ if(ENABLE_FEATURE_CLEAN_UP) free(buf);
if(!all) break;
}
if(file) endmntent(file);
if(rc) bb_perror_msg("Mounting %s on %s failed", blockDevice, directory);
+ if(ENABLE_FEATURE_CLEAN_UP) {
+ free(blockDevice);
+ free(directory);
+ }
return rc;
}
util-linux/nfsmount.c+6 -0
@@ -52,6 +52,12 @@
#include <rpc/pmap_clnt.h>
#include "nfsmount.h"
+/* This is just a warning of a common mistake. Possibly this should be a
+ * * uclibc faq entry rather than in busybox... */
+#if ENABLE_FEATURE_MOUNT_NFS && defined(__UCLIBC__) && ! defined(__UCLIBC_HAS_RPC__)
+#error "You need to build uClibc with UCLIBC_HAS_RPC for NFS support."
+#endif
+
/*
* NFS stats. The good thing with these values is that NFSv3 errors are