All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: kernel list <linux-kernel@vger.kernel.org>
Cc: jaharkes@cs.cmu.edu
Subject: Re: mount -tcoda /dev/cfs0 /mnt no longer works in -test9 and newer?
Date: Fri, 10 Nov 2000 21:39:11 +0100	[thread overview]
Message-ID: <20001110213911.A300@bug.ucw.cz> (raw)
In-Reply-To: <20001106103539.A343@bug.ucw.cz> <20001107134841.A31058@cs.cmu.edu>
In-Reply-To: <20001107134841.A31058@cs.cmu.edu>; from Jan Harkes on Tue, Nov 07, 2000 at 01:48:42PM -0500

[-- Attachment #1: muttWbQtHE --]
[-- Type: text/plain, Size: 1317 bytes --]

Hi!

> > 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.]
								Pavel
-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mount.c --]
[-- Type: text/x-csrc, Size: 785 bytes --]


#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>
#endif
#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);
}

  reply	other threads:[~2000-11-10 21:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-06  9:35 mount -tcoda /dev/cfs0 /mnt no longer works in -test9 and newer? Pavel Machek
2000-11-07 18:48 ` Jan Harkes
2000-11-10 20:39   ` Pavel Machek [this message]
2000-11-10 21:48     ` [BUG] coda went from c 67 5 to c 67 0 [was Re: mount -tcoda /dev/cfs0 /mnt no longer works in -test9 and newer?] Pavel Machek
2000-11-10 21:27       ` Jan Harkes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001110213911.A300@bug.ucw.cz \
    --to=pavel@suse.cz \
    --cc=jaharkes@cs.cmu.edu \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.