This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Mount always succeeds!?
- To: Martin van Veen <martin_van_veen at yahoo dot com>
- Subject: Re: [ECOS] Mount always succeeds!?
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Wed, 14 Mar 2001 17:54:57 +0000
- Cc: ecos-discuss at sources dot redhat dot com, Nick Garnett <nickg at redhat dot com>
- Organization: Red Hat UK Ltd.
- References: <20010314145632.99323.qmail@web11101.mail.yahoo.com>
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