diff --git a/libntfs/gnome-vfs-module.c b/libntfs/gnome-vfs-module.c index 8f09563f..e1a85ad9 100644 --- a/libntfs/gnome-vfs-module.c +++ b/libntfs/gnome-vfs-module.c @@ -28,9 +28,6 @@ #include #include /* for g_atexit() */ -/* Filesystem-module-scope lock for _any_ libntfs access. */ -G_LOCK_DEFINE(libntfs); - static void vfs_module_shutdown_atexit(void); /** diff --git a/ntfsprogs/attrdef.c b/ntfsprogs/attrdef.c index 4ffa5eeb..55a48594 100644 --- a/ntfsprogs/attrdef.c +++ b/ntfsprogs/attrdef.c @@ -1,3 +1,5 @@ +#include "attrdef.h" + /** * attrdef_ntfs12_array */ diff --git a/ntfsprogs/boot.c b/ntfsprogs/boot.c index f0535ffd..f1bdeb67 100644 --- a/ntfsprogs/boot.c +++ b/ntfsprogs/boot.c @@ -1,3 +1,5 @@ +#include "boot.h" + /** * boot_array - the first 3429 bytes of $Boot * The first 3429 bytes of $Boot. The rest is just zero. Total 8192 bytes. diff --git a/ntfsprogs/ntfsclone.c b/ntfsprogs/ntfsclone.c index 82044e5b..423ac154 100644 --- a/ntfsprogs/ntfsclone.c +++ b/ntfsprogs/ntfsclone.c @@ -95,7 +95,7 @@ static const char *dirty_volume_msg = "Volume '%s' is scheduled for a check or it was shutdown \n" "uncleanly. Please boot Windows or use the --force option to progress.\n"; -struct { +static struct { int verbose; int quiet; int debug; @@ -139,19 +139,19 @@ struct ntfs_walk_cluster { }; -ntfs_volume *vol = NULL; -struct bitmap lcn_bitmap; +static ntfs_volume *vol = NULL; +static struct bitmap lcn_bitmap; -int fd_in; -int fd_out; -FILE *msg_out = NULL; +static int fd_in; +static int fd_out; +static FILE *msg_out = NULL; -int wipe = 0; -unsigned int nr_used_mft_records = 0; -unsigned int wiped_unused_mft_data = 0; -unsigned int wiped_unused_mft = 0; -unsigned int wiped_resident_data = 0; -unsigned int wiped_timestamp_data = 0; +static int wipe = 0; +static unsigned int nr_used_mft_records = 0; +static unsigned int wiped_unused_mft_data = 0; +static unsigned int wiped_unused_mft = 0; +static unsigned int wiped_resident_data = 0; +static unsigned int wiped_timestamp_data = 0; static BOOL image_is_host_endian = FALSE; @@ -176,7 +176,7 @@ static BOOL image_is_host_endian = FALSE; #define NTFSCLONE_IMG_VER_MINOR 0 /* All values are in little endian. */ -struct { +static struct { char magic[IMAGE_MAGIC_SIZE]; u8 major_ver; u8 minor_ver; @@ -1406,7 +1406,7 @@ static void mount_volume(unsigned long new_mntflag) volume_size(vol, vol->nr_clusters)); } -struct ntfs_walk_cluster backup_clusters = { NULL, NULL }; +static struct ntfs_walk_cluster backup_clusters = { NULL, NULL }; static int device_offset_valid(int fd, s64 ofs) { diff --git a/ntfsprogs/ntfscmp.c b/ntfsprogs/ntfscmp.c index 53361dc6..414b64b7 100644 --- a/ntfsprogs/ntfscmp.c +++ b/ntfsprogs/ntfscmp.c @@ -39,7 +39,7 @@ static const char *hibernated_volume_msg = "turned off properly\n"; -struct { +static struct { int debug; int show_progress; int verbose; @@ -309,7 +309,7 @@ static inline s64 get_nr_mft_records(ntfs_volume *vol) #define NTFSCMP_EXTENSION_RECORD 4 #define NTFSCMP_INODE_CLOSE_ERROR 5 -const char *ntfscmp_errs[] = { +static const char *ntfscmp_errs[] = { "OK", "INODE_OPEN_ERROR", "INODE_OPEN_IO_ERROR", diff --git a/ntfsprogs/ntfsfix.c b/ntfsprogs/ntfsfix.c index 5aca7a9e..66e1becf 100644 --- a/ntfsprogs/ntfsfix.c +++ b/ntfsprogs/ntfsfix.c @@ -83,7 +83,7 @@ static const char *EXEC_NAME = "ntfsfix"; static const char *OK = "OK\n"; static const char *FAILED = "FAILED\n"; -struct { +static struct { char *volume; } opt; diff --git a/ntfsprogs/ntfsresize.c b/ntfsprogs/ntfsresize.c index b5cbeddb..b4797282 100644 --- a/ntfsprogs/ntfsresize.c +++ b/ntfsprogs/ntfsresize.c @@ -125,7 +125,7 @@ static const char *many_bad_sectors_msg = "* other reason. We suggest to get a replacement disk as soon as possible. *\n" "***************************************************************************\n"; -struct { +static struct { int verbose; int debug; int ro_flag; @@ -200,7 +200,7 @@ typedef struct { /* FIXME: This, lcn_bitmap and pos from find_free_cluster() will make a cluster allocation related structure, attached to ntfs_resize_t */ -s64 max_free_cluster_range = 0; +static s64 max_free_cluster_range = 0; #define NTFS_MBYTE (1000 * 1000)