> If you cleanup your patch to only contain the string changes, I would be able
> to do
> a comparison on the final binary size and in addition, we'd need a script
> (maybe grep
> with context using -B 2 is sufficient) to check whether any sizeof() is taken
> anywhere.
Would you like to try the appended update suggestion?
How are the chances to integrate this little clean-up into the current version
repository?
Regards,
Markus
diff -r cf4cc8c358eb -r f802389f1465 libfuse-lite/fusermount.c
--- a/libfuse-lite/fusermount.c Sat Feb 16 17:12:44 2008 +0000
+++ b/libfuse-lite/fusermount.c Thu Mar 06 19:41:49 2008 +0100
@@ -35,7 +35,7 @@
#define MS_DIRSYNC 128
#endif
-static const char *progname = "ntfs-3g-mount";
+static char const progname[] = "ntfs-3g-mount";
static int user_allow_other = 0;
static int mount_max = 1000;
@@ -386,7 +386,7 @@ static int do_mount(const char *mnt, cha
for (s = opts, d = optbuf; *s;) {
unsigned len;
- const char *fsname_str = "fsname=";
+ char const fsname_str[] = "fsname=";
for (len = 0; s[len] && s[len] != ','; len++);
if (begins_with(s, fsname_str)) {
if (!get_string_opt(s, len, fsname_str, &fsname))
diff -r cf4cc8c358eb -r f802389f1465 libntfs-3g/logging.c
--- a/libntfs-3g/logging.c Sat Feb 16 17:12:44 2008 +0000
+++ b/libntfs-3g/logging.c Thu Mar 06 19:41:49 2008 +0100
@@ -51,12 +51,12 @@
#endif
/* Colour prefixes and a suffix */
-static const char *col_green = "\e[32m";
-static const char *col_cyan = "\e[36m";
-static const char *col_yellow = "\e[01;33m";
-static const char *col_red = "\e[01;31m";
-static const char *col_redinv = "\e[01;07;31m";
-static const char *col_end = "\e[0m";
+static char const col_green [] = "\e[32m";
+static char const col_cyan [] = "\e[36m";
+static char const col_yellow[] = "\e[01;33m";
+static char const col_red [] = "\e[01;31m";
+static char const col_redinv[] = "\e[01;07;31m";
+static char const col_end [] = "\e[0m";
/* Some gcc 3.x, 4.[01].X crash with internal compiler error. */
#if __GNUC__ <= 3 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 1)
diff -r cf4cc8c358eb -r f802389f1465 libntfs-3g/version.c
--- a/libntfs-3g/version.c Sat Feb 16 17:12:44 2008 +0000
+++ b/libntfs-3g/version.c Thu Mar 06 19:41:49 2008 +0100
@@ -27,7 +27,7 @@
#include "version.h"
/* FIXME: merge libntfs into the user space NTFS driver */
-static const char *libntfs_version_string = "22:0:0";
+static char const libntfs_version_string[] = "22:0:0";
/**
* ntfs_libntfs_version - query version number of the ntfs library libntfs
diff -r cf4cc8c358eb -r f802389f1465 src/ntfs-3g.c
--- a/src/ntfs-3g.c Sat Feb 16 17:12:44 2008 +0000
+++ b/src/ntfs-3g.c Thu Mar 06 19:41:49 2008 +0100
@@ -140,17 +140,17 @@ static struct options {
char *device; /* Device to mount */
} opts;
-static const char *EXEC_NAME = "ntfs-3g";
-static char def_opts[] = "silent,allow_other,nonempty,";
+static char const EXEC_NAME[] = "ntfs-3g";
+static char const def_opts[] = "silent,allow_other,nonempty,";
static ntfs_fuse_context_t *ctx;
static u32 ntfs_sequence;
-static const char *locale_msg =
+static char const locale_msg[] =
"WARNING: Couldn't set locale to '%s' thus some file names may not\n"
" be correct or visible. Please see the potential solution at\n"
" http://ntfs-3g.org/support.html#locale\n";
-static const char *usage_msg =
+static char const usage_msg[] =
"\n"
"%s %s %s %d - Third Generation NTFS Driver\n"
"\n"
@@ -178,13 +178,13 @@ static int drop_privs(void) { return
static int drop_privs(void) { return 0; }
static int restore_privs(void) { return 0; }
-static const char *setuid_msg =
+static char const setuid_msg[] =
"Mount is denied because setuid and setgid root ntfs-3g is insecure with the\n"
"external FUSE library. Either remove the setuid/setgid bit from the binary\n"
"or rebuild NTFS-3G with integrated FUSE support and make it setuid root.\n"
"Please see more information at http://ntfs-3g.org/support.html#unprivileged\n";
-static const char *unpriv_fuseblk_msg =
+static char const unpriv_fuseblk_msg[] =
"Unprivileged user can not mount NTFS block devices using the external FUSE\n"
"library. Either mount the volume as root, or rebuild NTFS-3G with integrated\n"
"FUSE support and make it setuid root. Please see more information at\n"
diff -r cf4cc8c358eb -r f802389f1465 src/ntfs-3g.probe.c
--- a/src/ntfs-3g.probe.c Sat Feb 16 17:12:44 2008 +0000
+++ b/src/ntfs-3g.probe.c Thu Mar 06 19:41:49 2008 +0100
@@ -51,9 +51,9 @@ static struct options {
char *device;
} opts;
-static const char *EXEC_NAME = "ntfs-3g.probe";
+static char const EXEC_NAME[] = "ntfs-3g.probe";
-static const char *usage_msg =
+static char const usage_msg[] =
"\n"
"%s %s - Probe NTFS volume mountability\n"
"\n"
@@ -92,7 +92,7 @@ static int parse_options(int argc, char
{
int c;
- static const char *sopt = "-hrw";
+ static char const sopt[] = "-hrw";
static const struct option lopt[] = {
{ "readonly", no_argument, NULL, 'r' },
{ "readwrite", no_argument, NULL, 'w' },
diff -r cf4cc8c358eb -r f802389f1465 src/utils.c
--- a/src/utils.c Sat Feb 16 17:12:44 2008 +0000
+++ b/src/utils.c Thu Mar 06 19:41:49 2008 +0100
@@ -46,12 +46,12 @@ const char *ntfs_gpl = "This program is
"\"COPYING\" distributed with this program, or online at:\n"
"http://www.gnu.org/copyleft/gpl.html\n";
-static const char *invalid_ntfs_msg =
+static char const invalid_ntfs_msg[] =
"The device '%s' doesn't have a valid NTFS.\n"
"Maybe you selected the wrong device? Or the whole disk instead of a\n"
"partition (e.g. /dev/hda, not /dev/hda1)? Or the other way around?\n";
-static const char *corrupt_volume_msg =
+static char const corrupt_volume_msg[] =
"NTFS is either inconsistent, or you have hardware faults, or you have a\n"
"SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows\n"
"then reboot into Windows TWICE. The usage of the /f parameter is very\n"
@@ -60,7 +60,7 @@ static const char *corrupt_volume_msg =
"/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation\n"
"for the details.\n";
-static const char *hibernated_volume_msg =
+static char const hibernated_volume_msg[] =
"The NTFS partition is hibernated. Please resume and shutdown Windows\n"
"properly, or mount the volume read-only with the 'ro' mount option, or\n"
"mount the volume read-write with the 'remove_hiberfile' mount option.\n"
@@ -69,7 +69,7 @@ static const char *hibernated_volume_msg
" mount -t ntfs-3g %s %s -o remove_hiberfile\n"
"\n";
-static const char *unclean_journal_msg =
+static char const unclean_journal_msg[] =
"Mount is denied because NTFS is marked to be in use. Choose one action:\n"
"\n"
"Choice 1: If you have Windows then disconnect the external devices by\n"
@@ -79,22 +79,22 @@ static const char *unclean_journal_msg =
"Choice 2: If you don't have Windows then you can use the 'force' option for\n"
" your own responsibility. For example type on the command line:\n";
-static const char *opened_volume_msg =
+static char const opened_volume_msg[] =
"Mount is denied because the NTFS volume is already exclusively opened.\n"
"The volume may be already mounted, or another software may use it which\n"
"could be identified for example by the help of the 'fuser' command.\n";
-static const char *fakeraid_msg =
+static char const fakeraid_msg[] =
"You seem to have a SoftRAID/FakeRAID hardware and must use an activated,\n"
"different device under /dev/mapper/, (e.g. /dev/mapper/nvidia_eahaabcc1)\n"
"to mount NTFS. Please see the 'dmraid' documentation for help.\n";
-static const char *access_denied_msg =
-"Please check the volume and the ntfs-3g binary permissions,\n"
+static char const access_denied_msg[] =
+"Please check the volume %s and the ntfs-3g binary permissions,\n"
"and the mounting user ID. More explanation is provided at\n"
"http://ntfs-3g.org/support.html#unprivileged\n";
-static const char *forced_mount_msg =
+static char const forced_mount_msg[] =
"\n"
" mount -t ntfs-3g %s %s -o force\n"
"\n"
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel