Re: Howto mount cifs from c?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

it's working now. The code I used to create the unc= option was not
right. Now it does.

It's for a browseable map in the users homedirectory:

~/Network
   /FTP
   /Windows Network

The SMB networkmap is detected dynamically using libsmbclient
(workgroup/server/share) and the shares are mounted using cifs.

It works now. Thanks.

The browseable map is a FUSE fs (fuse-workspace).

My intention is to create something simular for FTP, using an external
(FUSE) mountcommand curlftpfs, or as an internal module which I have
to develop myself, based upon curlftpfs. The FTP servers are found in
a file, since in general they cannot be detected dynamically.

Another workspace is the ~/Devices map, where every block device is available.


Stef

2012/8/2 Stef Bon <stefbon@xxxxxxxxx>:
> Oh I'm sorry. The code I gave did add // and /, which was not ok again.
>
> I will try something like:
>
> memcpy(vfsdata+len0, "\\\\", 2)
> len0+=2;
>
> memcpy(vfsdata+len0, smb_server->name, strlen(smb_server->name));
> len0+=strlen(smb_server->name);
>
> memcpy(vfsdata+len0, "\\", 1)
> len0+=1;
>
> memcpy(vfsdata+len0, smb_share->name, strlen(smb_share->name));
> len0+=strlen(smb_share->name);
>
> and optional a terminator:
>
> *(vfsdata+len0)='\0';
>
> I will test this, and report back.
>
> Stef
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux