The Samba-Bugzilla – Attachment 1175 Details for
Bug 2652
smbmount return 0 when failed to find local mount point
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
smbmount.patch (text/plain), 1.32 KB, created by
Vincent Badier
on 2005-04-26 06:54:11 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Vincent Badier
Created:
2005-04-26 06:54:11 UTC
Size:
1.32 KB
patch
obsolete
>--- smbmount.c Tue Apr 26 15:35:32 2005 >+++ smbmount.c.ori Tue Apr 26 15:35:21 2005 >@@ -427,7 +427,7 @@ > /** > * Mount a smbfs > **/ >-static int init_mount(void) >+static void init_mount(void) > { > char mount_point[PATH_MAX+1]; > pstring tmp; >@@ -438,14 +438,14 @@ > > if (realpath(mpoint, mount_point) == NULL) { > fprintf(stderr, "Could not resolve mount point %s\n", mpoint); >- return (2); >+ return; > } > > > c = do_connection(service); > if (!c) { > fprintf(stderr,"SMB connection failed\n"); >- return (1); >+ exit(1); > } > > /* >@@ -512,22 +512,22 @@ > "smbmnt", strerror(errno)); > } > free(smbmnt_path); >- return(1); >+ exit(1); > } > > if (waitpid(-1, &status, 0) == -1) { > fprintf(stderr,"waitpid failed: Error was %s", strerror(errno) ); > /* FIXME: do some proper error handling */ >- return(1); >+ exit(1); > } > > if (WIFEXITED(status) && WEXITSTATUS(status) != 0) { > fprintf(stderr,"smbmnt failed: %d\n", WEXITSTATUS(status)); > /* FIXME: do some proper error handling */ >- return(1); >+ exit(1); > } else if (WIFSIGNALED(status)) { > fprintf(stderr, "smbmnt killed by signal %d\n", WTERMSIG(status)); >- return(1); >+ exit(1); > } > > /* Ok... This is the rubicon for that mount point... At any point >@@ -936,6 +936,6 @@ > } > strupper_m(my_netbios_name); > >- return init_mount(); >- >+ init_mount(); >+ return 0; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2652
: 1175