summaryrefslogtreecommitdiffstats
path: root/contrib/smbfs/lib/smb/ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/smbfs/lib/smb/ctx.c')
-rw-r--r--contrib/smbfs/lib/smb/ctx.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/contrib/smbfs/lib/smb/ctx.c b/contrib/smbfs/lib/smb/ctx.c
index 0709b6b..c7b3ecab 100644
--- a/contrib/smbfs/lib/smb/ctx.c
+++ b/contrib/smbfs/lib/smb/ctx.c
@@ -602,40 +602,12 @@ smb_ctx_gethandle(struct smb_ctx *ctx)
int fd, i;
char buf[20];
- /*
- * First, try to open as cloned device
- */
fd = open("/dev/"NSMB_NAME, O_RDWR);
if (fd >= 0) {
ctx->ct_fd = fd;
return 0;
}
- /*
- * well, no clone capabilities available - we have to scan
- * all devices in order to get free one
- */
- for (i = 0; i < 1024; i++) {
- snprintf(buf, sizeof(buf), "/dev/%s%d", NSMB_NAME, i);
- fd = open(buf, O_RDWR);
- if (fd >= 0) {
- ctx->ct_fd = fd;
- return 0;
- }
- }
- /*
- * This is a compatibility with old /dev/net/nsmb device
- */
- for (i = 0; i < 1024; i++) {
- snprintf(buf, sizeof(buf), "/dev/net/%s%d", NSMB_NAME, i);
- fd = open(buf, O_RDWR);
- if (fd >= 0) {
- ctx->ct_fd = fd;
- return 0;
- }
- if (errno == ENOENT)
- return ENOENT;
- }
- return ENOENT;
+ return ENOENT;
}
int
OpenPOWER on IntegriCloud