[PATCH 2/2] mount: -T OTHERTAB support
Denys Vlasenko
vda.linux at googlemail.com
Wed Mar 11 15:11:27 UTC 2015
On Wed, Mar 11, 2015 at 3:47 PM, Isaac Dunham <ibid.ag at gmail.com> wrote:
> On Wed, Mar 11, 2015 at 10:21:26AM +0100, walter harms wrote:
>>
>>
>> Am 11.03.2015 06:35, schrieb Isaac Dunham:
>> > +0 bytes disabled, +56 enabled when DESKTOP is enabled (glibc/i386):
>> > function old new delta
>> > .rodata 144949 144971 +22
>> > packed_usage 30236 30256 +20
>> > mount_main 1200 1214 +14
>> > ------------------------------------------------------------------------------
>> > (add/remove: 0/0 grow/shrink: 3/0 up/down: 56/0) Total: 56 bytes
>> > text data bss dec hex filename
>> > 757557 2068 9044 768669 bba9d busybox_old
>> > 757593 2068 9044 768705 bbac1 busybox_unstripped
Applied, thanks!
>> > - const char *fstabname;
>> > + char *fstabname = (char*)"/etc/fstab";
>>
>> i am curious why (char *) ?
>
> The cast is just to shut up GCC, since busybox has enabled an option that
> makes GCC treat "string" as const char *.
>
> The architectural reason for using char * instead of const char *
> is that -T makes fstabname variable (and it's simpler to use the same
> declarations when practical).
The correct thing here is to use "const char*".
VAR in "const char *VAR" is _variable_ too, not constant.
The constant pointer is declared like this: "const char *const CNST".
More information about the busybox
mailing list