Joerg Schilling schrieb am 2006-01-30: > Albert Cahalan <[email protected]> wrote: > > > On 1/30/06, Joerg Schilling <[email protected]> wrote: > > > Albert Cahalan <[email protected]> wrote: > > > > > > > Let's address the second bug first. Linux provides full > > > > bus number and LUN info for all block devices. You get it > > > > like this: > > > > > > > > struct stat sbuf; > > > > stat("/dev/hdc", &sbuf); > > > > int bus = sbuf.st_mode>>12; > > > > int target = major(sbuf.st_rdev); > > > > int lun = minor(sbuf.st_rdev); > > > > > > Now tell me how to match this with information from /dev/sg* > > > > You do the obvious, scanning /dev to find the device file. > > I am sorry, but you obviously did not understand the problem. Stop offending people who are trying to be helpful just because they suggest different solutions than you expect. You - again - elided Albert's crucial part, which even included an offer to fix things: : If you need to map from /dev/hd* to /dev/sg*, then you have : found a bug. Explain what must be added to /dev/hd* so that : you don't need to go messing with /dev/sg* anymore. -- Matthias Andree - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- From: Bartlomiej Zolnierkiewicz <[email protected]>
- Re: CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- From: Joerg Schilling <[email protected]>
- Re: CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- From: Matthias Andree <[email protected]>
- Re: CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- From: Jan Engelhardt <[email protected]>
- Re: CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- From: Joerg Schilling <[email protected]>
- Re: CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- From: Albert Cahalan <[email protected]>
- Re: CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- From: Joerg Schilling <[email protected]>
- Re: CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- From: Albert Cahalan <[email protected]>
- Re: CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- From: Joerg Schilling <[email protected]>
- CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- Prev by Date: Re: DMA Transfer problem
- Next by Date: Re: CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- Previous by thread: Re: CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- Next by thread: Re: CD writing in future Linux try #2 [ was: Re: CD writing in future Linux (stirring up a hornets' nest) ]
- Index(es):