lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 21 Jan 2015 17:44:22 +0000
From:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
To:	Siddhartha De <siddhartha.de87@...il.com>
Cc:	kernelnewbies@...nelnewbies.org,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: Question about kernel interfaces

On Sun, 18 Jan 2015 15:03:55 +0530
> Let's say you need to call an ioctl from a shell script ( I know its a
> very rare use case but please bear with me ... :) )
> 
> So the current way of doing it is probably to write a C program which
> actually calls the ioctl and then call the C program from the shell
> script ...

That's how Unix is designed yes. It means that the ioctl internals are
hidden from the scripts and the tools provided can be used instead.

> and the IOCTL_EJECT ioctl would get called on /dev/cdrom
> that is ioctl ( &handle_to_/dev/cdrom , IOCTL_EJECT , &some_buffer )
> would get called ( by our translator running as a separate program or
> as a service daemon )

You can just run "eject". It knows about all the details of doing an
eject.
 
The equivalent of a "library" in shell scripts is a program. Small,
simple tools that do one job and do it right, or at least before GNU got
hold of them 8)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ