This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Mount always succeeds!?


Martin van Veen wrote:
> 
> I'm a bit puzzled... Why should the mount system call (located
> in packages/io/fileio/current/src/misc.cxx) always return ENOERR,
> even when the mount of the filesystem failed?

Just an oversight.
 
> In other words: why is the result of the filesystem mount (the
> function I mean here is the function that is called when the mount
> system call executes f->mount (f, m)) only used to set m->valid
> when the valid field of a mount table entry is not used anywhere?

Not used anywhere in the code at present, but it is open to inspection by
other utility functions. But in saying that, I would have thought valid
should be inspected during cyg_mtab_lookup() and umount() before doing
anything. Nick?

> I would expect that if the filesystem mount failed, the mount system
> call returns -1 and sets errno to the value returned by the filesystem
> mount (see attached patch). Otherwise the caller of the mount system
> call can never find out if the mount succeeded.

You are right. I've applied your patch. Thanks!

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]