diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/ntvfs/ntvfs_generic.c | 15 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_qfileinfo.c | 7 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_search.c | 6 | ||||
-rw-r--r-- | source4/torture/gentest.c | 10 |
4 files changed, 11 insertions, 27 deletions
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c index 8e1eb0bc66..9aa8e04787 100644 --- a/source4/ntvfs/ntvfs_generic.c +++ b/source4/ntvfs/ntvfs_generic.c @@ -576,9 +576,6 @@ static NTSTATUS ntvfs_map_fsinfo_finish(struct ntvfs_module_context *ntvfs, /* and convert it to the required level */ switch (fs->generic.level) { - case RAW_QFS_GENERIC: - return NT_STATUS_INVALID_LEVEL; - case RAW_QFS_DSKATTR: { /* map from generic to DSKATTR */ unsigned int bpunit = 64; @@ -666,10 +663,10 @@ static NTSTATUS ntvfs_map_fsinfo_finish(struct ntvfs_module_context *ntvfs, fs->objectid_information.out.guid = fs2->generic.out.guid; ZERO_STRUCT(fs->objectid_information.out.unknown); return NT_STATUS_OK; - } - - return NT_STATUS_INVALID_LEVEL; + default: + return NT_STATUS_INVALID_LEVEL; + } } /* @@ -715,8 +712,6 @@ NTSTATUS ntvfs_map_fileinfo(TALLOC_CTX *mem_ctx, int i; /* and convert it to the required level using results in info2 */ switch (info->generic.level) { - case RAW_FILEINFO_GENERIC: - return NT_STATUS_INVALID_LEVEL; case RAW_FILEINFO_GETATTR: info->getattr.out.attrib = info2->generic.out.attrib & 0xff; info->getattr.out.size = info2->generic.out.size; @@ -931,9 +926,9 @@ NTSTATUS ntvfs_map_fileinfo(TALLOC_CTX *mem_ctx, info->unix_link_info.out.link_dest = info2->generic.out.link_dest; return NT_STATUS_OK; #endif + default: + return NT_STATUS_INVALID_LEVEL; } - - return NT_STATUS_INVALID_LEVEL; } /* diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c b/source4/ntvfs/posix/pvfs_qfileinfo.c index e54fc2d669..515819b6ee 100644 --- a/source4/ntvfs/posix/pvfs_qfileinfo.c +++ b/source4/ntvfs/posix/pvfs_qfileinfo.c @@ -149,9 +149,6 @@ static NTSTATUS pvfs_map_fileinfo(struct pvfs_state *pvfs, int fd) { switch (info->generic.level) { - case RAW_FILEINFO_GENERIC: - return NT_STATUS_INVALID_LEVEL; - case RAW_FILEINFO_GETATTR: info->getattr.out.attrib = name->dos.attrib; info->getattr.out.size = name->st.st_size; @@ -333,9 +330,11 @@ static NTSTATUS pvfs_map_fileinfo(struct pvfs_state *pvfs, name->original_name); NT_STATUS_HAVE_NO_MEMORY(info->all_info2.out.fname.s); return NT_STATUS_OK; + + default: + return NT_STATUS_INVALID_LEVEL; } - return NT_STATUS_INVALID_LEVEL; } /* diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c index a050de1ec3..668f8d741e 100644 --- a/source4/ntvfs/posix/pvfs_search.c +++ b/source4/ntvfs/posix/pvfs_search.c @@ -220,11 +220,9 @@ static NTSTATUS fill_search_info(struct pvfs_state *pvfs, file->id_both_directory_info.name.s = fname; return NT_STATUS_OK; - case RAW_SEARCH_DATA_GENERIC: - break; + default: + return NT_STATUS_INVALID_LEVEL; } - - return NT_STATUS_INVALID_LEVEL; } diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c index 37ae2c03e5..28e6953683 100644 --- a/source4/torture/gentest.c +++ b/source4/torture/gentest.c @@ -2309,15 +2309,7 @@ static void gen_setfileinfo(int instance, union smb_setfileinfo *info) info->full_ea_information.in.eas = gen_ea_list(); break; - case RAW_SFILEINFO_GENERIC: - case RAW_SFILEINFO_SEC_DESC: - case RAW_SFILEINFO_1025: - case RAW_SFILEINFO_1029: - case RAW_SFILEINFO_1032: - case RAW_SFILEINFO_UNIX_BASIC: - case RAW_SFILEINFO_UNIX_INFO2: - case RAW_SFILEINFO_UNIX_LINK: - case RAW_SFILEINFO_UNIX_HLINK: + default: /* Untested */ break; } |