Re: Any body know how losetup interact with kernel

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

 



On Tue, Feb 11, 2003 at 06:49:22AM -0000, Rajaram Suresh Gaunker wrote:

[NOTE: I've cut your CC list. Allessandro Rubini wan't too happy about
 your CC last time simply cause he had nothing to do with it. Therefore
 I don't trust your posting behaviour and only CC'ed the kernelnewbies
 list. Randomly CC'ing innocent people is very annoying for them.
 Please think before you post next time. Thank you.]

> In encrypted filesystem u need to add some more safe encryption 
> algorithms , but losetup provides two options for algprithm 
> specificatopn ,
> 
> what i need to do when i want to provide the more option.

Check the source.

> Do anybody know where losetups code is located.

The losetup command usually lives in the same package that provides the
mount command. On a Debian system you figure out with "dpkg -S
/sbin/losetup", on an RPM based distribution you need "rpm -qf
/sbin/losetup". Get the source package ("apt-get source mount" on
/Debian), and you'll have your source.

> Is it a system call .. i didn't found anything like that in 
> syscall source code.

Remember that it works on a loop device, so it has to be an ioctl. How
to find such things?

- The loop device configuration question is asked in the block devices
  section, so read drivers/block/Config.in
- The config option for "Loopback device support" is called
  CONFIG_BLK_DEV_LOOP
- drivers/block/Makefile says it needs to build loop.o if
  CONFIG_BLK_DEV_LOOP is selected
- In order to build loop, loop.c is needed, so the file to look at is 
  drivers/block/loop.c
- It's a device so look for the ioctl() function


Erik

-- 
J.A.K. (Erik) Mouw
Email: J.A.K.Mouw@its.tudelft.nl  mouw@nl.linux.org

Attachment: pgp00302.pgp
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux