Google luky.org euqset.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Linux FAT issue on SD Cards.. maintainer support please


On Fri, Aug 19, 2005 at 05:09:06PM +0530, Mukund JB`. wrote:
> To handle it in a similarly in Linux we need to support this driver with
> partitions. There looks a loop hole in the driver. 
> I will verify and fix it today.

I suggest having a look at how other drivers use the add_disk call,
since it calls the partition checking code already in the kernel
automatically as far as I can tell.  You really shouldn't have to write
any of the partition parsing code at all.  You should just have to setup
a structure describing the disk and which major/minor numbers it uses,
and passing that to add_disk and it should deal with the rest.

> Just out of inquisitive ness.
> 
> What r u the minor numbers of those zip devices.
> ll /dev/zip 
> ll /dev/zip4

They are symlinks:
/dev/zip -> /dev/sda
/dev/zip4 -> /dev/sda4

sda uses major,minor: 8,0
sda1: 8.1
sda2: 8,2
...
sda15: 8,15
sdb: 8,16
sdb1: 8.17
...
sdb15: 8,31

That is how scsi does it.

If your driver supports multiple slots at once, decide how many to
support, or decide to only allow a few partitions, and space them by 8
or 16 (allowing 7 and 15 partitions respectively), and it should be easy
to deal with.  sda of course accesses the whole device, while sda1 and
up are for those partitions.  I am pretty sure there is standard
partition handling code in the kernel you should be accessing.

> Thanks for ur support.
> I will check with partition support in the driver & update it.
> Let me fix it there and come back.

Len Sorensen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


$B$3$N>pJs$,$"$J$?$NC5$7$F$$?$b$N$+$I$&$+A*Br$7$F$/$@$5$!#(B
yes/$B$^$5$K$3$l$@!*(B   no/$B0c$&$J$!(B   part/$B0lIt8+$D$+$C$?(B   try/$B$3$l$G;n$7$F$_$k(B

$B$"$J$?$,C5$7$F$$?>pJs$O$I$N$h$&$J$3$H$+!"$4<+M3$K5-F~2<$5$!#FC$K!V$^$5$K$3$l$@!*!W$H8@$&>l9g$O5-F~$r$*4j$$7$^$9!#(B
$BNc(B:$B!VJ#?t$N%^%7%s$+$i(BCATV$B7PM3$G(Bipmasquerade$B$rMxMQ$7$F(BWeb$B$r;2>H$7$?$>l9g$N@_Dj$K$D$$F!W(B
References: