[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] support for cp --parents
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2009-09-26 12:32:54
Message-ID: 200909261432.54970.vda.linux () googlemail ! com
[Download RAW message or body]
On Saturday 26 September 2009 01:56, Ian Wienand wrote:
> Hi,
>
> A little patch to enable --parents in cp, if the new cp long options
> config is turned on.
>
> Should you choose it, it seems to add ~150 bytes
>
> function old new delta
> cp_main 273 407 +134
> cp_longopts - 11 +11
> ------------------------------------------------------------------------------
> (add/remove: 1/0 grow/shrink: 1/0 up/down: 145/0) Total: 145 bytes
> text data bss dec hex filename
> 849561 4358 9736 863655 d2da7 busybox_old
> 849766 4366 9728 863860 d2e74 busybox_unstripped
#ifdef CONFIG_FEATURE_CP_LONG_OPTIONS is typo-unsafe:
any typo will not be detected. Use:
#if ENABLE_FEATURE_CP_LONG_OPTIONS
+const char *applet_long_options = cp_longopts;
This is wrong, this causes us to have two copies of global
variable applet_long_options! I am surprised this even works
(does it?), but it is definitely not the way to do it.
bb_make_directory(dest_dir, (mode_t)(-1), FILEUTILS_RECUR)
Second paramenter is long, not mode_t.
Applied with the changes to correct the above. Thanks!
--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic