[lkml]   [2000]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: mount -tcoda /dev/cfs0 /mnt no longer works in -test9 and newer?

> > It complains
> >
> > coda_read_super: Bad mount data
> > coda_read_super: device index: 0
> >
> > and will not mount. What do I need to mount coda?
> > Pavel
> Miklos Szeredi sent a patch to support multiple mountpoints/coda
> devices. However, the code falls back on the default device (cfs0)
> when the mountdata is incorrect. So the problem must be unrelated
> to the "Bad mount data" error message.
> The code to mount with the correct mountdata looks like this:
> #include <linux/coda.h>
> muxfd = open("/dev/cfs0", O_RDWR);
> struct coda_mount_data mountdata;
> mountdata.version = CODA_MOUNT_VERSION;
> mountdata.fd = muxfd
> error = mount("coda", "/coda", "coda", MS_MGC_VAL,
> (void *)&mountdata);

This does not work:

open("/dev/cfs0", O_RDWR) = -1 ENODEV (No such device)
mount("coda", "/mnt", "coda", 0xc0ed0000, 0xbffffc04coda_read_super:
Bad file
coda_read_super: device index: 0
coda_read_super: No pseudo device
) = -1 EINVAL (Invalid argument)
_exit(-1) = ?

:-(. [I attached full source to my mount utility.]
I'm "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at

#include <dirent.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <signal.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#ifdef SOLARIS
#include <sys/types32.h>
#include <sys/fcntl.h>
#include <sys/mount.h>
#include <sys/mntent.h>
#include <sys/mnttab.h>
#include <sys/stat.h>
#include <sys/time.h>
#include "/usr/src/linux/include/linux/coda.h"
#define MS_MGC_VAL 0xC0ED0000 /* magic flag number to indicate "new" flags */

void main(void)
int muxfd = open("/dev/cfs0", O_RDWR);
int error;

struct coda_mount_data mountdata;
mountdata.version = CODA_MOUNT_VERSION;
mountdata.fd = muxfd;

error = mount("coda", "/mnt", "coda", MS_MGC_VAL,
(void *)&mountdata);
 \ /
  Last update: 2005-03-22 12:45    [W:0.050 / U:8.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site