From 7aebba2e12f31e254cde40216ff16c2546459e33 Mon Sep 17 00:00:00 2001 From: cha0smaster Date: Fri, 29 Jul 2005 21:37:09 +0000 Subject: [PATCH] minor improvements to index.h and ntfsmount.c --- include/ntfs/index.h | 4 ++-- ntfsprogs/ntfsmount.c | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/include/ntfs/index.h b/include/ntfs/index.h index d7bfbc6f..5330a61e 100644 --- a/include/ntfs/index.h +++ b/include/ntfs/index.h @@ -31,7 +31,7 @@ /** * @ni: inode containing the @entry described by this context - * @name: name of the which context describes + * @name: name of the index described by this context * @name_len: length of the index name * @entry: index entry (points into @ir or @ia) * @data: index entry data (points into @entry) @@ -115,5 +115,5 @@ static inline void ntfs_index_entry_mark_dirty(ntfs_index_context *ictx) else ictx->ia_dirty = TRUE; } -#endif /* _NTFS_INDEX_H */ +#endif /* _NTFS_INDEX_H */ diff --git a/ntfsprogs/ntfsmount.c b/ntfsprogs/ntfsmount.c index 65c90dde..0726480f 100644 --- a/ntfsprogs/ntfsmount.c +++ b/ntfsprogs/ntfsmount.c @@ -304,8 +304,11 @@ static int ntfs_fuse_filler(ntfs_fuse_fill_context_t *fill_ctx, if (name_type == FILE_NAME_DOS) return 0; - if (ntfs_ucstombs(name, name_len, &filename, 0) < 0) - return -errno; + if (ntfs_ucstombs(name, name_len, &filename, 0) < 0) { + Eprintf("Skipping unrepresentable file (inode %lld): %s\n", + MREF(mref), strerror(errno)); + return 0; + } if (MREF(mref) >= FILE_first_user || ctx->show_sys_files) fill_ctx->filler(fill_ctx->buf, filename, NULL, 0); free(filename); @@ -955,6 +958,15 @@ static char *parse_options(char *options, char **device) } ctx->ro =TRUE; strcat(ret, "ro,"); +#ifdef DEBUG + } else if (!strcmp(opt, "fake_ro")) { + if (val) { + Eprintf("fake_ro option should not have " + "value.\n"); + goto err_exit; + } + ctx->ro =TRUE; +#endif } else if (!strcmp(opt, "fsname")) { /* Filesystem name. */ /* * We need this to be able to check whether filesystem