Commit Graph

295 Commits

Author SHA1 Message Date
Denis Vlasenko
8f8f268cfd bb_applet_name -> applet_name 2006-10-03 21:00:43 +00:00
Denis Vlasenko
67b23e6043 getopt_ulflags -> getopt32.
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
2006-10-03 21:00:06 +00:00
Denis Vlasenko
a959588b80 Yet another silly little byte saving. couldn't -> cannot 2006-09-29 21:30:43 +00:00
Denis Vlasenko
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
Bernhard Reutner-Fischer
dea6e3d3cf - Tito pointed out that Rob forgot to add e2fsprogs/blkid/list.c 2006-09-11 09:16:12 +00:00
Rob Landley
49ea46667f Build fixes for gcc 4.0 with -Werror, from Tito. 2006-09-11 01:34:21 +00:00
Denis Vlasenko
9cac521f07 using [xa]sprintf for string concatenation is neat and saves
~100 bytes according to bloatcheck. Also this fixes bug in rpm
2006-09-09 12:24:19 +00:00
Denis Vlasenko
6d655be5df removed a lot of trailing \n in bb_msg() calls. It is added
automatically by function itself.
2006-09-06 19:02:46 +00:00
Rob Landley
081e38483e Remove xcalloc() and convert its callers to xzalloc(). About half of them
were using "1" as one of the arguments anyway, and as for the rest a multiply
and a push isn't noticeably bigger than pushing two arguments on the stack.
2006-08-03 20:07:35 +00:00
Rob Landley
d921b2ecc0 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.)
2006-08-03 15:41:12 +00:00
"Robert P. J. Day"
c773ac8a79 Delete unused version.c file and corresponding function prototypes
from blkid.h.  If this file needs to be resurrected, it can be
based on ext2fs/version.c.
2006-07-03 18:11:39 +00:00
"Robert P. J. Day"
63fc1a9e08 Standardize on the vi editing directives being on the first line. 2006-07-02 19:47:05 +00:00
"Robert P. J. Day"
7ccb65f3a4 Yet more "#if 0" content removed. 2006-07-01 15:09:17 +00:00
Rob Landley
11c7a7bed6 Various cleanups I made while going through Erik Hovland's patch submissions,
some of which are even from him. :)
2006-06-25 22:39:24 +00:00
Rob Landley
768945b762 A few patches from Erik Hovland, turning strncpy() into safe_strncpy() and
removing some unnecessary code.
2006-06-25 00:34:52 +00:00
Rob Landley
7a260f01ce Make some 64 bit warnings go away on x86-64. 2006-06-19 03:20:03 +00:00
Rob Landley
15d20a03d6 Remove _() and N_() from platform.h. #define them as NOP macros in the two
files still using them.  I didn't remove them from e2fsck.c to avoid stomping
pending cleanup patches from Garrett, and I didn't bother to remove them from
fdisk.c because that entire file needs to be rewritten from scratch.
2006-05-29 05:00:44 +00:00
Rob Landley
81dab2cf83 Fix hdparm to use PRIu64 instead of typecasting to long long (which is 128 bits
on 64 bit platforms), and move #include <inttypes.h> to libbb.h.
2006-05-28 01:56:08 +00:00
Rob Landley
299a6b4d7b Consolidate #include <sys/time.h> so libbb.h does it. 2006-05-27 21:42:58 +00:00
Rob Landley
206f75784b Remove unused function parameter, from Garrett. 2006-05-19 22:42:23 +00:00
Bernhard Reutner-Fischer
d8e87a09d1 - forgot to make busybox_unstripped depend on the applets in IMA mode. 2006-05-19 18:37:34 +00:00
Bernhard Reutner-Fischer
e2e56c7c41 - single KERNEL_VERSION(a,b,c) macro in platform.h
- rename get_kernel_revision() to get_linux_version_code
from Robert P. J. Day
2006-05-19 11:54:02 +00:00
Rob Landley
81369a8b2f Typo that hits big endian systems. 2006-05-17 19:47:58 +00:00
Mike Frysinger
39440e520c pull Rules.mak from top_srcdir as pointed out by Robert P. J. Day on the mailing list 2006-05-13 02:33:09 +00:00
Mike Frysinger
d148a94a2a move the dir related rules to the end so the E2FSPROGS_AR rule is the default 2006-05-11 04:39:09 +00:00
Mike Frysinger
be7c539b7a dont use tabs people 2006-05-11 04:37:25 +00:00
Rob Landley
d8f6601502 Another patch from Garrett: remove bad block bitmap checking code. Everything
produced in the list ten years has some variant of internal error correction
(disks, cdrom, flash), so if it has user-visible bad blocks on it the
hardware has exhausted its remapping reserve and is dying, and you need to get
your data off pronto.  (The one exception I can think of is floppies, and I
don't care.)
2006-05-05 17:29:09 +00:00
Rob Landley
7c94bed234 Big dead code elimination pass from Garrett. 2006-05-03 21:58:45 +00:00
Rob Landley
035ef5659e Patch from Garrett Kajmowicz to move a lot of #defines into the
header file.
2006-05-03 20:05:18 +00:00
Mike Frysinger
f8346038e9 kill off pointless malloc.h include 2006-04-16 21:17:00 +00:00
Rob Landley
3e72c5931c Another size reduction patch from Garrett. 2006-04-06 22:49:04 +00:00
Bernhard Reutner-Fischer
dee811a53d - remove unused ext2fs_find_first_bit_set() and ext2fs_find_next_bit_set() 2006-04-04 12:17:24 +00:00
Bernhard Reutner-Fischer
89aaf4e249 - pull in prototype for e2fsck_main. 2006-04-04 12:10:28 +00:00
Rob Landley
03e78e75f3 The build broke for me on gcc 4.0.3 due to an #include having the wrong patch. 2006-04-01 17:36:31 +00:00
Rob Landley
43ac88849b Ext2fs cleanup from Garrett Kajmowicz. 2006-04-01 00:40:33 +00:00
Bernhard Reutner-Fischer
1f6dc6d358 - rename clean_up in tune2fs and mke2fs to be prefixed with their applet names.
Purely cosmetic to ease readability.
2006-03-30 13:54:30 +00:00
Bernhard Reutner-Fischer
d409c3a2f7 - Rich Felker writes: fix invalid printf format strings
http://busybox.net/lists/busybox/2006-March/019568.html

   text	   data	    bss	    dec	    hex	filename
 900619	  10316	1038724	1949659	 1dbfdb	busybox.oorig
 900603	  10316	1038724	1949643	 1dbfcb	busybox
2006-03-29 22:34:47 +00:00
Mike Frysinger
f885513940 just whitespace fixes 2006-03-28 02:35:56 +00:00
Mike Frysinger
06adf5fb47 2006-03-21 Shaun Jackman <sjackman@gmail.com>: Include signal.h instead of sys/signal.h. 2006-03-22 00:25:07 +00:00
Mike Frysinger
9aa7f2005d declare const id argument const for probe_{ext2,ext3,cramfs} 2006-03-18 04:17:59 +00:00
Mike Frysinger
179f417788 need string.h as well as strings.h 2006-03-18 04:13:32 +00:00
Mike Frysinger
25f67d419d need EXT2FS_OBJS for fsck 2006-03-18 04:11:51 +00:00
Bernhard Reutner-Fischer
df10094870 - revert back to r14406 2006-03-13 19:04:00 +00:00
Bernhard Reutner-Fischer
07a79e75f5 - backout using features which are not available with the previous stable
version of make (3.71.1).
2006-03-09 09:03:37 +00:00
Mike Frysinger
874af85d5e import most of e2fsprogs 1.38 updates 2006-03-08 07:03:27 +00:00
Rob Landley
dfba741457 Robert P. Day removed 8 gazillion occurrences of "extern" on function
definitions.  (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Bernhard Reutner-Fischer
2e9cf373a9 - workaround bug in make-3.81beta4:
- has to use
/top/obj/dir/*.o: /top/obj/dir/file.o: /top/src/file.c
instead of the proper
/top/obj/dir/*.o: /top/obj/dir/file.o: /top/src/dir/file.c
2006-03-06 14:20:43 +00:00
Bernhard Reutner-Fischer
022eb311d5 - use absolute path for top_builddir and top_srcdir.
Fixes make trying to include the very same file in an endless loop.
2006-03-02 17:33:25 +00:00
Bernhard Reutner-Fischer
5d26126b9e - fixes parallel builds (make -j)
- use less resources for the buildsystem itself
2006-03-01 22:54:48 +00:00
Rob Landley
e7c43b66d7 Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)
from before "if(x) free(x)".
2006-03-01 16:39:45 +00:00
Rob Landley
75cc0cace3 I was playing around with a dependency generator a couple weeks ago and I found
some #include files that aren't in the tree.  No biggie...
2006-02-24 03:15:34 +00:00
Bernhard Reutner-Fischer
ed7bb6278d - put NLS stuff in one central place to avoid redefines.
Fixes warnings about:
fdisk.c:45:1: warning: "_" redefined
nfsmount.c:121:1: warning: "_" redefined
nfsmount.c:122:1: warning: "N_" redefined
interface.c:84:1: warning: "_" redefined
2006-02-23 14:25:15 +00:00
Rob Landley
d6e14d8bee Don't build directory libraries unless we're building an applet that needs it.
Cherry-picked from Devin Bayer's big MacOS X patch.
2006-02-21 19:11:35 +00:00
Mike Frysinger
b38673fb9f make the build system puuuuuuuuuuurty 2006-02-02 01:41:53 +00:00
Eric Andersen
3496fdc9a5 hopefully the last of the annoying signed/unsigned and mixed type errors 2006-01-30 23:09:20 +00:00
Tim Riker
c1ef7bdd8d just whitespace 2006-01-25 00:08:53 +00:00
Rob Landley
8b6063490d Once more, with fewer inappropriate semicolons. 2006-01-24 02:38:28 +00:00
Rob Landley
391a904f46 Ken McGuire's patch to make mke2fs and e2fsck work on big endian systems like
PPC, with an obligatory couple of swipes from me.
2006-01-23 21:38:06 +00:00
Bernhard Reutner-Fischer
86f5c9906b - add platform.h.
- use shorter boilerplate while at it.
2006-01-22 22:55:11 +00:00
Bernhard Reutner-Fischer
7ca61b6f33 - shared libbusybox.
- IMA compilation option (aka IPO, IPA,..)
Please holler if i broke something..
2006-01-15 14:04:57 +00:00
"Vladimir N. Oleynik"
350865e339 remove bug: fsck do not know path 2005-11-26 11:01:23 +00:00
"Vladimir N. Oleynik"
cc34344d91 change the interface of libbb/compare_string_array (unsigned short to int), usaging for e2fsprogs/fsck 2005-11-26 10:45:26 +00:00
"Vladimir N. Oleynik"
61ff4b3973 more use const for interface of libbb/compare_string_array, example usage for e2fsprogs/fsck 2005-11-26 10:33:55 +00:00
"Vladimir N. Oleynik"
1f0262bcdb another more const 2005-10-20 11:17:48 +00:00
"Vladimir N. Oleynik"
c961a44e0b more const, all data to text 2005-10-15 14:41:08 +00:00
"Vladimir N. Oleynik"
368f66492e perror correction 2005-10-12 16:45:21 +00:00
"Vladimir N. Oleynik"
d20cfbd303 create e2fs_set_sbin_path(), noticed by Tito, Thanks 2005-10-12 16:22:19 +00:00
"Vladimir N. Oleynik"
6c35c7c976 usage bb_dev_null 2005-10-12 15:34:25 +00:00
"Vladimir N. Oleynik"
3ebb895218 make fsck.h as common, e2fsck: includes correct 2005-10-12 12:24:01 +00:00
"Vladimir N. Oleynik"
ab57f76e13 more busyboxes, remove 1 extern function (mainstream also have for one fsck) 2005-10-12 12:11:42 +00:00
"Vladimir N. Oleynik"
1c275de6a2 more busyboxes 2005-10-12 11:38:09 +00:00
"Vladimir N. Oleynik"
083d3f49c2 bb_mkdep: Rewroted. removed problem "include name must uniq", speed up * 3.
e2fsprogs: remove confuse bb_mkdep. Use internal e2fsprogs includes only.
other: remove confuse bb_mkdep.
2005-10-10 11:35:17 +00:00
Bernhard Reutner-Fischer
7abe709867 - Fix spurious rebuilds for (parallel) out-of-tree builds.
Make sure that the directories are order-only prerequisites. Otherwise we
  may have object files created after the timestamp of the directory was
  updated which would lead to spurious rebuilds (as some of the dentries
  may be older than the dir itself).
2005-10-05 10:06:11 +00:00
Bernhard Reutner-Fischer
5c071bcf2f - fix building out-of-tree;
to test, checkout the source (let's assume /scratch/src/busybox), then
  mkdir /tmp/bb ; cd /tmp/bb
  make top_srcdir=/scratch/src/busybox O="$(pwd)" -f /scratch/src/busybox/Makefile allyesconfig check
- default to O=$(pwd) if no O was specified. Now you can just specify
  the top_srcdir (without O=/somewhere) to create the obj-tree in pwd.
- make "make configtarget buildtarget" work. Previously this didn't
  work due to how HAVE_DOT_CONFIG was evaluated. Two separate steps were
  needed before, e.g. make config ; make busybox.
- remove some unneeded variables from Rules.mak (BB_SRC_DIR from Mr.
  ldoolitt@recycle.lbl) which suggest that the stuff fixed above
  didn't work before.
- move selinux libraries to where they belong (from Makefile to Rules.mak)
- update the docs to mention svn instead of cvs and provide an example
  for building out-of-tree in INSTALL.
2005-10-05 07:40:46 +00:00
Mike Frysinger
dc2510327b as Tito points out, e2fsck and fsck need more dependencies 2005-10-05 00:52:37 +00:00
Mike Frysinger
7f782da048 excellent shrinkage patch by Tito 2005-10-02 08:10:31 +00:00
Mike Frysinger
9134dff078 clean out unneeded E2FSCK variables 2005-10-02 08:09:50 +00:00
Bernhard Reutner-Fischer
e6d5539ebb typo 2005-09-30 09:46:27 +00:00
Bernhard Reutner-Fischer
f24e0f5e6f - remove duplicate entry of resolve.c in BLKID_SRC
- use the sourcedir to look for includes rather than the builddir
2005-09-30 08:25:50 +00:00
"Vladimir N. Oleynik"
39a841cecf change interface to bb_xasprintf() - more perfect for me.
ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers
reduce 100 bytes don't care in sum
2005-09-29 16:18:57 +00:00
"Vladimir N. Oleynik"
6a60c821a8 forgotten putenv 2005-09-29 15:53:34 +00:00
"Vladimir N. Oleynik"
6160d45e05 more busybox's style for fsck.c, size reduce 2005-09-29 09:45:22 +00:00
"Vladimir N. Oleynik"
69d728be18 more const, inline, forward declaration usage, strip 20k source size ;-) 2005-09-28 15:16:22 +00:00
"Vladimir N. Oleynik"
3978e5576e move e2fsck/* to e2fsck.c, one e2fsck_main and jornal exported, small automatic size reduction 2005-09-27 11:43:29 +00:00
Mike Frysinger
16ce8aa412 fix building w/out et headers and w/out debug 2005-09-27 04:21:48 +00:00
Mike Frysinger
7ad978045d fix building with debugging enabled #413 2005-09-25 05:18:04 +00:00
Mike Frysinger
5423df9ebc force nodebug by default 2005-09-24 07:20:59 +00:00
Mike Frysinger
62f18e1f20 use the shorter license header 2005-09-24 07:16:29 +00:00
Mike Frysinger
51a43b47fe import the very fat e2fsck/fsck applets 2005-09-24 07:11:16 +00:00
Mike Frysinger
bfe773f471 make sure we include local header files 2005-09-24 07:10:37 +00:00
Mike Frysinger
0f8a63896e err, fix stupid mistake in previous do_findfs() change 2005-09-24 06:07:34 +00:00
Mike Frysinger
0d4ee68be5 use brief license line 2005-09-24 06:01:57 +00:00
Mike Frysinger
97b43a7999 fix broken whitespace and remove pointless mkdir 2005-09-24 05:58:39 +00:00
Mike Frysinger
a1c6a57fea make e2label and findfs optional 2005-09-24 05:55:03 +00:00
"Vladimir N. Oleynik"
9bfb2fc922 hmm, forgoten remove llseek? 2005-09-19 14:25:55 +00:00
"Vladimir N. Oleynik"
b71e6024f9 mke2fs.c can compiled for me, more bb_xstrdup and bb_xasprintf usage, remove 1 exporing, ext2fs_llseek/blkid_llseek->llseek 2005-09-19 13:48:39 +00:00
Rob Landley
20a825aed8 Fix warnings. 2005-09-07 07:04:56 +00:00
Rob Landley
e1d9633e20 Bernhard Fischer submitted a couple of Makefile patches:
- Fix building out-of-tree
- remove duplicate rule in toplevel Makefile
- peruse make's builtin notion of `dirname $@'
2005-08-24 00:41:52 +00:00
Mike Frysinger
e70aa9de7e only declare do_swap if we need it 2005-07-30 09:43:58 +00:00
Mike Frysinger
f7eaf5a012 apgo in Bug 351 says: punt parse_version_number since it is no longer used 2005-07-30 07:29:22 +00:00
Mike Frysinger
4d00896d05 use toplevel ARFLAGS and update default ARFLAGS to be quiet 2005-07-27 01:09:24 +00:00
Mike Frysinger
fc379ba077 rip out all the non-linux code and ugly workarounds 2005-06-28 23:50:18 +00:00
Mike Frysinger
df1eda82b9 Tito says: unify verbose/quiet flags 2005-06-17 02:13:57 +00:00
Mike Frysinger
d0615ae73a Tito says: strip unused program_name
Vladimir N. Oleynik says: uname() can be replaced with get_kernel_revision()
2005-06-17 01:35:52 +00:00
Mike Frysinger
d5826903c1 use xmalloc instead of malloc 2005-06-12 00:45:09 +00:00
Mike Frysinger
7fde8debc4 use malloc instead of xmalloc 2005-06-11 22:37:25 +00:00
Mike Frysinger
d1a9d57bd6 use xmalloc() instead of malloc() 2005-06-11 22:25:27 +00:00
Mike Frysinger
2401ce5343 use xmalloc() and bb_perror_msg_and_die() 2005-06-11 22:24:15 +00:00
Mike Frysinger
0b3fc1a9ac remove com_err.h includes 2005-06-11 20:29:02 +00:00
Mike Frysinger
16bc6159f3 DOS only crap 2005-06-11 20:28:47 +00:00
Mike Frysinger
6447ac0ef4 import initial fat mke2fs 2005-06-11 05:29:40 +00:00
Mike Frysinger
174808cedb import tune2fs support 2005-06-11 01:14:09 +00:00
Mike Frysinger
a34f99930d fix signed/unsigned char pointers 2005-06-11 00:50:59 +00:00
Mike Frysinger
7ffce0c119 oops, we only want to affect local CFLAGS 2005-06-11 00:45:50 +00:00
Mike Frysinger
d5624dcc0d initial fat tune2fs/findfs/e2label source 2005-06-11 00:40:20 +00:00
Mike Frysinger
cae717e1f6 replace simple is_null func with a memcmp define 2005-06-11 00:36:04 +00:00
Mike Frysinger
f3d28845f8 force including of e2fsbb.h and move the HAVE_* defines to it 2005-06-11 00:27:50 +00:00
Mike Frysinger
e037622641 make sure clean removes objects in subdirs 2005-06-11 00:12:12 +00:00
Mike Frysinger
f98f5e37cd need strings.h for ffs() 2005-06-11 00:11:46 +00:00
Mike Frysinger
0301ffab3d only define some variables if legacy EXT2FS_ENABLE_SWAPFS is enabled 2005-06-11 00:11:37 +00:00
Mike Frysinger
1f96c97984 replace simple functions with defines 2005-06-11 00:10:44 +00:00
Mike Frysinger
68497c0bd3 whitespace updates 2005-06-11 00:10:29 +00:00
Mike Frysinger
3968082df4 replace functions with defines 2005-06-11 00:09:46 +00:00
Mike Frysinger
a1c9c66ac0 whitespace updates 2005-06-11 00:09:39 +00:00
Mike Frysinger
e2c51a8dc6 whitespace updates 2005-06-11 00:09:24 +00:00
Mike Frysinger
85cffcc83d recode functions to shrink size 2005-06-11 00:08:50 +00:00
Mike Frysinger
942e137679 setup the HAVE_* defines 2005-06-11 00:03:13 +00:00
Mike Frysinger
b2312e9901 make sure we add the local dir to the include path 2005-05-16 22:05:07 +00:00
Eric Andersen
9cc7f3230a This makefile was a mess. Fix it to work as intended.
-Erik
2005-05-11 23:20:09 +00:00
Mike Frysinger
38a33f91c0 import more libs to prep for new e2fsprogs 2005-05-09 22:13:22 +00:00
Mike Frysinger
1fd98e039d import ext2fs lib to prep for new e2fsprogs 2005-05-09 22:10:42 +00:00
Mike Frysinger
b32011943a no longer applies 2005-05-09 22:10:10 +00:00
Mike Frysinger
7a121e92eb import base_device.c for fsck 2005-05-09 22:09:00 +00:00
Mike Frysinger
8d929dab60 remove unused files 2005-05-09 21:58:36 +00:00
Mike Frysinger
a88d52237b trim out useless defines and use some busybox funcs 2005-05-09 21:57:44 +00:00
Mike Frysinger
507d1f76e5 override nls P_() macro 2005-05-09 21:53:25 +00:00
Mike Frysinger
ea338fffb5 patch by Tito which uses a lot more busybox functions to reduce size nicely 2005-05-07 07:17:43 +00:00
Mike Frysinger
6adfd349e9 update e2p target to match condensed files 2005-05-07 07:16:54 +00:00
Mike Frysinger
548ffd49a3 patch by Tito which unifies common get/set functions into 1 get/set function and cuts down on the size used significantly :) 2005-05-07 07:14:41 +00:00
Mike Frysinger
ba3a01f5e0 add/remove defines to handle more e2fsprogs 2005-05-07 06:49:54 +00:00
Mike Frysinger
d6a8f5f0d0 use a generic error message 2005-04-25 05:27:12 +00:00
Mike Frysinger
c238a97a9e use asprintf in place of malloc/sprintf as suggested by solar 2005-04-25 05:24:35 +00:00
Mike Frysinger
d2a64d2fc2 bbify to shrink size 2005-04-25 04:10:35 +00:00
Mike Frysinger
d89e5e6450 svn didnt auto add these ... 2005-04-24 05:15:12 +00:00
Mike Frysinger
d89e629e52 add new subdir for e2fsprogs 2005-04-24 05:07:59 +00:00