Re: mount weirdness
Hi,
i wrote:
> > mount -v /dev/sdc /wa1
> > echo $?
Duh. "/dev/sdb2", not "/dev/sdc".
(Do as i mean, not as i write.)
Dennis Wicks wrote:
> I'll put a note in my fstab so the next time I boot I can find it if the
> mount fails again!
Did i miss the report about some miracle cure beyond the link to /wa11 ?
I did a search for "wa1" in Linux kernel git.
https://github.com/torvalds/linux/search?utf8=%E2%9C%93&q=wa1&type=
The name seems not to be hardcoded there.
So my best guess is that it is mistaken by mount(8) for something other
than a target path.
This opportunity to be mistaken could be excluded by a test program
which uses mount(2).
I tested this program "ts_mount.c":
-------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <sys/mount.h>
#include <errno.h>
#include <string.h>
int main()
{
int ret;
ret = mount("/dev/sr4", "/mnt/iso", "iso9660", MS_RDONLY, "");
if(ret == 0) {
printf("Success\n");
exit(0);
}
printf("Failed\n");
printf("errno= %d (%s)\n", errno, strerror(errno));
exit(1);
}
-------------------------------------------------------------------------
with a DVD drive by:
cc -g -Wall -o ts_mount ts_mount.c
./ts_mount
As normal user i got
Failed
errno= 1 (Operation not permitted)
and as superuser
Success
Drive noise and listed files confirm the optimistic message.
Without medium i get
Failed
errno= 123 (No medium found)
Have a nice day :)
Thomas
Reply to: