diff options
author | Steve French <sfrench@us.ibm.com> | 2008-04-28 20:06:05 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-04-28 20:06:05 -0400 |
commit | 4b18f2a9c3964f7612b7403dddc1d1ba5443ae24 (patch) | |
tree | 6deaca1844706e70e235be6fe502269e4f15355f /fs/cifs/connect.c | |
parent | e9f20d6f03e8df393b001dab6dc5226c2a5daf57 (diff) |
[CIFS] convert usage of implicit booleans to bool
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index e17106730168..6c4332f8da6c 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -71,23 +71,23 @@ struct smb_vol { | |||
71 | mode_t file_mode; | 71 | mode_t file_mode; |
72 | mode_t dir_mode; | 72 | mode_t dir_mode; |
73 | unsigned secFlg; | 73 | unsigned secFlg; |
74 | unsigned rw:1; | 74 | bool rw:1; |
75 | unsigned retry:1; | 75 | bool retry:1; |
76 | unsigned intr:1; | 76 | bool intr:1; |
77 | unsigned setuids:1; | 77 | bool setuids:1; |
78 | unsigned override_uid:1; | 78 | bool override_uid:1; |
79 | unsigned override_gid:1; | 79 | bool override_gid:1; |
80 | unsigned noperm:1; | 80 | bool noperm:1; |
81 | unsigned no_psx_acl:1; /* set if posix acl support should be disabled */ | 81 | bool no_psx_acl:1; /* set if posix acl support should be disabled */ |
82 | unsigned cifs_acl:1; | 82 | bool cifs_acl:1; |
83 | unsigned no_xattr:1; /* set if xattr (EA) support should be disabled*/ | 83 | bool no_xattr:1; /* set if xattr (EA) support should be disabled*/ |
84 | unsigned server_ino:1; /* use inode numbers from server ie UniqueId */ | 84 | bool server_ino:1; /* use inode numbers from server ie UniqueId */ |
85 | unsigned direct_io:1; | 85 | bool direct_io:1; |
86 | unsigned remap:1; /* set to remap seven reserved chars in filenames */ | 86 | bool remap:1; /* set to remap seven reserved chars in filenames */ |
87 | unsigned posix_paths:1; /* unset to not ask for posix pathnames. */ | 87 | bool posix_paths:1; /* unset to not ask for posix pathnames. */ |
88 | unsigned no_linux_ext:1; | 88 | bool no_linux_ext:1; |
89 | unsigned sfu_emul:1; | 89 | bool sfu_emul:1; |
90 | unsigned nullauth:1; /* attempt to authenticate with null user */ | 90 | bool nullauth:1; /* attempt to authenticate with null user */ |
91 | unsigned nocase; /* request case insensitive filenames */ | 91 | unsigned nocase; /* request case insensitive filenames */ |
92 | unsigned nobrl; /* disable sending byte range locks to srv */ | 92 | unsigned nobrl; /* disable sending byte range locks to srv */ |
93 | unsigned int rsize; | 93 | unsigned int rsize; |
@@ -345,8 +345,8 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) | |||
345 | struct task_struct *task_to_wake = NULL; | 345 | struct task_struct *task_to_wake = NULL; |
346 | struct mid_q_entry *mid_entry; | 346 | struct mid_q_entry *mid_entry; |
347 | char temp; | 347 | char temp; |
348 | int isLargeBuf = FALSE; | 348 | bool isLargeBuf = false; |
349 | int isMultiRsp; | 349 | bool isMultiRsp; |
350 | int reconnect; | 350 | int reconnect; |
351 | 351 | ||
352 | current->flags |= PF_MEMALLOC; | 352 | current->flags |= PF_MEMALLOC; |
@@ -390,8 +390,8 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) | |||
390 | } else /* if existing small buf clear beginning */ | 390 | } else /* if existing small buf clear beginning */ |
391 | memset(smallbuf, 0, sizeof(struct smb_hdr)); | 391 | memset(smallbuf, 0, sizeof(struct smb_hdr)); |
392 | 392 | ||
393 | isLargeBuf = FALSE; | 393 | isLargeBuf = false; |
394 | isMultiRsp = FALSE; | 394 | isMultiRsp = false; |
395 | smb_buffer = smallbuf; | 395 | smb_buffer = smallbuf; |
396 | iov.iov_base = smb_buffer; | 396 | iov.iov_base = smb_buffer; |
397 | iov.iov_len = 4; | 397 | iov.iov_len = 4; |
@@ -517,7 +517,7 @@ incomplete_rcv: | |||
517 | reconnect = 0; | 517 | reconnect = 0; |
518 | 518 | ||
519 | if (pdu_length > MAX_CIFS_SMALL_BUFFER_SIZE - 4) { | 519 | if (pdu_length > MAX_CIFS_SMALL_BUFFER_SIZE - 4) { |
520 | isLargeBuf = TRUE; | 520 | isLargeBuf = true; |
521 | memcpy(bigbuf, smallbuf, 4); | 521 | memcpy(bigbuf, smallbuf, 4); |
522 | smb_buffer = bigbuf; | 522 | smb_buffer = bigbuf; |
523 | } | 523 | } |
@@ -582,16 +582,18 @@ incomplete_rcv: | |||
582 | (mid_entry->command == smb_buffer->Command)) { | 582 | (mid_entry->command == smb_buffer->Command)) { |
583 | if (check2ndT2(smb_buffer,server->maxBuf) > 0) { | 583 | if (check2ndT2(smb_buffer,server->maxBuf) > 0) { |
584 | /* We have a multipart transact2 resp */ | 584 | /* We have a multipart transact2 resp */ |
585 | isMultiRsp = TRUE; | 585 | isMultiRsp = true; |
586 | if (mid_entry->resp_buf) { | 586 | if (mid_entry->resp_buf) { |
587 | /* merge response - fix up 1st*/ | 587 | /* merge response - fix up 1st*/ |
588 | if (coalesce_t2(smb_buffer, | 588 | if (coalesce_t2(smb_buffer, |
589 | mid_entry->resp_buf)) { | 589 | mid_entry->resp_buf)) { |
590 | mid_entry->multiRsp = 1; | 590 | mid_entry->multiRsp = |
591 | true; | ||
591 | break; | 592 | break; |
592 | } else { | 593 | } else { |
593 | /* all parts received */ | 594 | /* all parts received */ |
594 | mid_entry->multiEnd = 1; | 595 | mid_entry->multiEnd = |
596 | true; | ||
595 | goto multi_t2_fnd; | 597 | goto multi_t2_fnd; |
596 | } | 598 | } |
597 | } else { | 599 | } else { |
@@ -603,17 +605,15 @@ incomplete_rcv: | |||
603 | /* Have first buffer */ | 605 | /* Have first buffer */ |
604 | mid_entry->resp_buf = | 606 | mid_entry->resp_buf = |
605 | smb_buffer; | 607 | smb_buffer; |
606 | mid_entry->largeBuf = 1; | 608 | mid_entry->largeBuf = |
609 | true; | ||
607 | bigbuf = NULL; | 610 | bigbuf = NULL; |
608 | } | 611 | } |
609 | } | 612 | } |
610 | break; | 613 | break; |
611 | } | 614 | } |
612 | mid_entry->resp_buf = smb_buffer; | 615 | mid_entry->resp_buf = smb_buffer; |
613 | if (isLargeBuf) | 616 | mid_entry->largeBuf = isLargeBuf; |
614 | mid_entry->largeBuf = 1; | ||
615 | else | ||
616 | mid_entry->largeBuf = 0; | ||
617 | multi_t2_fnd: | 617 | multi_t2_fnd: |
618 | task_to_wake = mid_entry->tsk; | 618 | task_to_wake = mid_entry->tsk; |
619 | mid_entry->midState = MID_RESPONSE_RECEIVED; | 619 | mid_entry->midState = MID_RESPONSE_RECEIVED; |
@@ -638,8 +638,8 @@ multi_t2_fnd: | |||
638 | smallbuf = NULL; | 638 | smallbuf = NULL; |
639 | } | 639 | } |
640 | wake_up_process(task_to_wake); | 640 | wake_up_process(task_to_wake); |
641 | } else if ((is_valid_oplock_break(smb_buffer, server) == FALSE) | 641 | } else if (!is_valid_oplock_break(smb_buffer, server) && |
642 | && (isMultiRsp == FALSE)) { | 642 | !isMultiRsp) { |
643 | cERROR(1, ("No task to wake, unknown frame received! " | 643 | cERROR(1, ("No task to wake, unknown frame received! " |
644 | "NumMids %d", midCount.counter)); | 644 | "NumMids %d", midCount.counter)); |
645 | cifs_dump_mem("Received Data is: ", (char *)smb_buffer, | 645 | cifs_dump_mem("Received Data is: ", (char *)smb_buffer, |
@@ -825,7 +825,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
825 | vol->file_mode = (S_IRWXUGO | S_ISGID) & (~S_IXGRP); | 825 | vol->file_mode = (S_IRWXUGO | S_ISGID) & (~S_IXGRP); |
826 | 826 | ||
827 | /* vol->retry default is 0 (i.e. "soft" limited retry not hard retry) */ | 827 | /* vol->retry default is 0 (i.e. "soft" limited retry not hard retry) */ |
828 | vol->rw = TRUE; | 828 | vol->rw = true; |
829 | /* default is always to request posix paths. */ | 829 | /* default is always to request posix paths. */ |
830 | vol->posix_paths = 1; | 830 | vol->posix_paths = 1; |
831 | 831 | ||
@@ -1181,7 +1181,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1181 | } else if (strnicmp(data, "guest", 5) == 0) { | 1181 | } else if (strnicmp(data, "guest", 5) == 0) { |
1182 | /* ignore */ | 1182 | /* ignore */ |
1183 | } else if (strnicmp(data, "rw", 2) == 0) { | 1183 | } else if (strnicmp(data, "rw", 2) == 0) { |
1184 | vol->rw = TRUE; | 1184 | vol->rw = true; |
1185 | } else if ((strnicmp(data, "suid", 4) == 0) || | 1185 | } else if ((strnicmp(data, "suid", 4) == 0) || |
1186 | (strnicmp(data, "nosuid", 6) == 0) || | 1186 | (strnicmp(data, "nosuid", 6) == 0) || |
1187 | (strnicmp(data, "exec", 4) == 0) || | 1187 | (strnicmp(data, "exec", 4) == 0) || |
@@ -1197,7 +1197,7 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1197 | is ok to just ignore them */ | 1197 | is ok to just ignore them */ |
1198 | continue; | 1198 | continue; |
1199 | } else if (strnicmp(data, "ro", 2) == 0) { | 1199 | } else if (strnicmp(data, "ro", 2) == 0) { |
1200 | vol->rw = FALSE; | 1200 | vol->rw = false; |
1201 | } else if (strnicmp(data, "hard", 4) == 0) { | 1201 | } else if (strnicmp(data, "hard", 4) == 0) { |
1202 | vol->retry = 1; | 1202 | vol->retry = 1; |
1203 | } else if (strnicmp(data, "soft", 4) == 0) { | 1203 | } else if (strnicmp(data, "soft", 4) == 0) { |
@@ -2602,7 +2602,7 @@ sesssetup_nomem: /* do not return an error on nomem for the info strings, | |||
2602 | 2602 | ||
2603 | static int | 2603 | static int |
2604 | CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | 2604 | CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, |
2605 | struct cifsSesInfo *ses, int *pNTLMv2_flag, | 2605 | struct cifsSesInfo *ses, bool *pNTLMv2_flag, |
2606 | const struct nls_table *nls_codepage) | 2606 | const struct nls_table *nls_codepage) |
2607 | { | 2607 | { |
2608 | struct smb_hdr *smb_buffer; | 2608 | struct smb_hdr *smb_buffer; |
@@ -2625,7 +2625,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2625 | if (ses == NULL) | 2625 | if (ses == NULL) |
2626 | return -EINVAL; | 2626 | return -EINVAL; |
2627 | domain = ses->domainName; | 2627 | domain = ses->domainName; |
2628 | *pNTLMv2_flag = FALSE; | 2628 | *pNTLMv2_flag = false; |
2629 | smb_buffer = cifs_buf_get(); | 2629 | smb_buffer = cifs_buf_get(); |
2630 | if (smb_buffer == NULL) { | 2630 | if (smb_buffer == NULL) { |
2631 | return -ENOMEM; | 2631 | return -ENOMEM; |
@@ -2778,7 +2778,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2778 | CIFS_CRYPTO_KEY_SIZE); | 2778 | CIFS_CRYPTO_KEY_SIZE); |
2779 | if (SecurityBlob2->NegotiateFlags & | 2779 | if (SecurityBlob2->NegotiateFlags & |
2780 | cpu_to_le32(NTLMSSP_NEGOTIATE_NTLMV2)) | 2780 | cpu_to_le32(NTLMSSP_NEGOTIATE_NTLMV2)) |
2781 | *pNTLMv2_flag = TRUE; | 2781 | *pNTLMv2_flag = true; |
2782 | 2782 | ||
2783 | if ((SecurityBlob2->NegotiateFlags & | 2783 | if ((SecurityBlob2->NegotiateFlags & |
2784 | cpu_to_le32(NTLMSSP_NEGOTIATE_ALWAYS_SIGN)) | 2784 | cpu_to_le32(NTLMSSP_NEGOTIATE_ALWAYS_SIGN)) |
@@ -2939,7 +2939,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2939 | } | 2939 | } |
2940 | static int | 2940 | static int |
2941 | CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | 2941 | CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, |
2942 | char *ntlm_session_key, int ntlmv2_flag, | 2942 | char *ntlm_session_key, bool ntlmv2_flag, |
2943 | const struct nls_table *nls_codepage) | 2943 | const struct nls_table *nls_codepage) |
2944 | { | 2944 | { |
2945 | struct smb_hdr *smb_buffer; | 2945 | struct smb_hdr *smb_buffer; |
@@ -3569,7 +3569,7 @@ int cifs_setup_session(unsigned int xid, struct cifsSesInfo *pSesInfo, | |||
3569 | { | 3569 | { |
3570 | int rc = 0; | 3570 | int rc = 0; |
3571 | char ntlm_session_key[CIFS_SESS_KEY_SIZE]; | 3571 | char ntlm_session_key[CIFS_SESS_KEY_SIZE]; |
3572 | int ntlmv2_flag = FALSE; | 3572 | bool ntlmv2_flag = false; |
3573 | int first_time = 0; | 3573 | int first_time = 0; |
3574 | 3574 | ||
3575 | /* what if server changes its buffer size after dropping the session? */ | 3575 | /* what if server changes its buffer size after dropping the session? */ |