Re: Howto mount cifs from c?

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

 



On Thu, 2 Aug 2012 22:20:26 +0200
Stef Bon <stefbon@xxxxxxxxx> wrote:

> uid: 0
> >> >> kernel: fs/cifs/connect.c: UNC: \\SCLFS20091030/public ip: 192.168.0.2
> >                                         ^^^^^^^^
> > Your unc= parm is bogus, it requires backslashes as delimiters.
> >
> > Is there some reason you're not using mount.cifs?
> >
> 
> I'm mounting from my own c program, and would like to use the general
> mount command from c.
> 
> Look at some messages back, I've tried backslashes there, and the code
> that does that is there. There I also got errors,, so the construction
> to create/add the unc to the options is probably wrong.
> 


I'm not sure about your earlier messages, but the UNC in the example
above is clearly bogus. It should be something like:

    \\SCLFS20091030\public

Replicating all of the logic in mount.cifs sounds fragile. I'd urge you
not to do that. If you do insist on doing that, then a kernel patchset
that eliminates the need for the silly unc= parameter in the first
place would be a good way to help ensure that that doesn't break in the
future.

-- 
Jeff Layton <jlayton@xxxxxxxxx>
--
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