summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-04-29 11:52:48 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-04-29 16:38:13 +1000
commit08c90d6f2df85499f43c5766a62839e80437290f (patch)
treefcb15e9db58d7b136825c4e418fa43370a48e39c
parent0a3c84b554f3862b3e558f62e67ceb8311b248ce (diff)
downloadsamba-08c90d6f2df85499f43c5766a62839e80437290f.tar.gz
samba-08c90d6f2df85499f43c5766a62839e80437290f.tar.bz2
samba-08c90d6f2df85499f43c5766a62839e80437290f.zip
s3-smb Use FILE_ATTRIBUTE_VOLUME intead of aVOLID
This means we use just one constant for this file attribute. Andrew Bartlett
-rw-r--r--source3/include/smb.h1
-rw-r--r--source3/lib/util.c2
-rw-r--r--source3/smbd/reply.c6
3 files changed, 4 insertions, 5 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index d65ec379fe..bb192cd5e8 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -86,7 +86,6 @@ enum smb_read_errors {
#define DIR_STRUCT_SIZE 43
/* these define the attribute byte as seen by DOS */
-#define aVOLID (1L<<3) /* 0x08 */
#define aDIR (1L<<4) /* 0x10 */
#define aARCH (1L<<5) /* 0x20 */
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 1cd0059dd7..ac79b994c9 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -304,7 +304,7 @@ char *attrib_string(uint16 mode)
attrstr[0] = 0;
- if (mode & aVOLID) fstrcat(attrstr,"V");
+ if (mode & FILE_ATTRIBUTE_VOLUME) fstrcat(attrstr,"V");
if (mode & aDIR) fstrcat(attrstr,"D");
if (mode & aARCH) fstrcat(attrstr,"A");
if (mode & FILE_ATTRIBUTE_HIDDEN) fstrcat(attrstr,"H");
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 6c498fd40e..ad72e4b7a9 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1520,11 +1520,11 @@ void reply_search(struct smb_request *req)
/* Initialize per SMBsearch/SMBffirst/SMBfunique operation data */
dptr_init_search_op(dirptr);
- if ((dirtype&0x1F) == aVOLID) {
+ if ((dirtype&0x1F) == FILE_ATTRIBUTE_VOLUME) {
char buf[DIR_STRUCT_SIZE];
memcpy(buf,status,21);
if (!make_dir_struct(ctx,buf,"???????????",volume_label(SNUM(conn)),
- 0,aVOLID,0,!allow_long_path_components)) {
+ 0,FILE_ATTRIBUTE_VOLUME,0,!allow_long_path_components)) {
reply_nterror(req, NT_STATUS_NO_MEMORY);
goto out;
}
@@ -2160,7 +2160,7 @@ void reply_mknew(struct smb_request *req)
goto out;
}
- if (fattr & aVOLID) {
+ if (fattr & FILE_ATTRIBUTE_VOLUME) {
DEBUG(0,("Attempt to create file (%s) with volid set - "
"please report this\n",
smb_fname_str_dbg(smb_fname)));