From 57c475a0aed6762b85b1504ea449331d5a51ae2a Mon Sep 17 00:00:00 2001 From: szaka Date: Mon, 9 Jul 2007 21:49:52 +0000 Subject: [PATCH] Give more hints what the problem could be during mount --- src/ntfs-3g.c | 9 ++++++++- src/utils.c | 12 ++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index b73c1971..b8e8073f 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -155,6 +155,10 @@ static const char *fuse26_kmod_msg = " http://ntfs-3g.org/support.html#fuse26\n" "\n"; +static const char *dev_fuse_msg = +"HINT: You should be root, or make ntfs-3g setuid root, or load the FUSE\n" +" kernel module as root (modprobe fuse) and make sure /dev/fuse exist.\n"; + static const char *usage_msg = "\n" "%s %s - Third Generation NTFS Driver\n" @@ -2016,8 +2020,11 @@ static void create_dev_fuse(void) struct stat st; if (stat("/dev/fuse", &st) && (errno == ENOENT)) { - if (mknod("/dev/fuse", S_IFCHR | 0666, makedev(10, 229))) + if (mknod("/dev/fuse", S_IFCHR | 0666, makedev(10, 229))) { ntfs_log_perror("Failed to create /dev/fuse"); + if (errno == EPERM) + ntfs_log_error(dev_fuse_msg); + } } } diff --git a/src/utils.c b/src/utils.c index ae4cb568..d866b559 100644 --- a/src/utils.c +++ b/src/utils.c @@ -52,9 +52,13 @@ static const char *invalid_ntfs_msg = "partition (e.g. /dev/hda, not /dev/hda1)? Or the other way around?\n"; static const char *corrupt_volume_msg = -"NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE!\n" -"The usage of the /f parameter is very IMPORTANT! No modification was\n" -"made to NTFS by this software.\n"; +"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" +"important! If you have SoftRAID/FakeRAID then first you must activate\n" +"it and mount a different device under the /dev/mapper/ directory, (e.g.\n" +"/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation\n" +"for the details.\n"; static const char *hibernated_volume_msg = "The NTFS partition is hibernated. Please resume and shutdown Windows\n" @@ -77,7 +81,7 @@ static const char *opened_volume_msg = static const char *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" +"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 *dirty_volume_msg =