mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* devfs fixes
@ 2015-10-13  7:51 Sascha Hauer
  2015-10-13  7:51 ` [PATCH 1/4] fs: devfs: Allow mounting only on /dev/ Sascha Hauer
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Sascha Hauer @ 2015-10-13  7:51 UTC (permalink / raw)
  To: Barebox List

We have some places in the code where we expect a cdev name, but
also allow a full /dev/ path. We handle this by doing:

	if (!strncmp(name, "/dev/", 5))
		name += 5;

As Peter noticed this of course only works when devfs is mounted on
/dev/. With this series we actually enforce that to avoid surprises.
Also we "officially" allow to pass a /dev/ path for opening a cdev
by moving the above code to cdev_open.

Sascha

----------------------------------------------------------------
Sascha Hauer (4):
      fs: devfs: Allow mounting only on /dev/
      fs: devfs: Allow mount path in cdev_open
      filetype: Use cdev_open
      fs: pass path directly to cdev_open

 common/filetype.c | 4 +++-
 fs/devfs-core.c   | 6 +++++-
 fs/devfs.c        | 7 +++++++
 fs/fs.c           | 9 +--------
 4 files changed, 16 insertions(+), 10 deletions(-)

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-13  8:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-13  7:51 devfs fixes Sascha Hauer
2015-10-13  7:51 ` [PATCH 1/4] fs: devfs: Allow mounting only on /dev/ Sascha Hauer
2015-10-13  7:51 ` [PATCH 2/4] fs: devfs: Allow mount path in cdev_open Sascha Hauer
2015-10-13  8:25   ` Sascha Hauer
2015-10-13  7:51 ` [PATCH 3/4] filetype: Use cdev_open Sascha Hauer
2015-10-13  7:51 ` [PATCH 4/4] fs: pass path directly to cdev_open Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox