From 260bc987b00b3fff6c9b99211627b14e9bd0789a Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Wed, 8 Jun 2011 19:00:18 +0200 Subject: s4:ntvfs subsystem - quiet enum warnings Simply return "NT_STATUS_INVALID_LEVEL" for unknown types of requests. Reviewed-by: Tridge --- source4/ntvfs/posix/pvfs_qfileinfo.c | 7 +++---- source4/ntvfs/posix/pvfs_search.c | 6 ++---- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'source4/ntvfs/posix') 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; } -- cgit