[PATCH v2] decode mtd ioctls
Dmitry V. Levin
ldv at altlinux.org
Wed Apr 4 18:14:49 UTC 2012
On Tue, Apr 03, 2012 at 10:22:48PM -0400, Mike Frysinger wrote:
> On Tuesday 03 April 2012 19:11:32 Dmitry V. Levin wrote:
> > On Tue, Apr 03, 2012 at 02:24:33AM -0400, Mike Frysinger wrote:
> > > I got tired of figuring out mtd structures (which show up a lot
> > > in the embedded space), so add decoders for those ioctls.
> > >
> > > * defs.h (mtd_ioctl): New prototype.
> > > (print_loff_t): Likewise.
> > > * io.c (print_loff_t): Delete static keyword
> > > * ioctl.c (ioctl_decode): Call mtd_ioctl when code is 'M'.
> > > * Makefile.am (strace_SOURCES): Add mtd.c.
> > > * mtd.c: New file.
> >
> > I've got a system where it doesn't compile because mtd/mtd-user.h
> > is not installed there:
> >
> > mtd.c:30:26: fatal error: mtd/mtd-user.h: No such file or directory
> >
> > One may argue that the system must provide this file, but I'd rather
> > like to have a traditional workaround for such cases. ;)
>
> should i just copy the header locally ? or add a mtd-user.h header check and
> disable the code if it's not found ?
I've got another system where this header file is installed but it's quite
unusable:
mtd.c:33:4: error: 'MTD_OPS_PLACE_OOB' undeclared here (not in a function)
mtd.c:34:4: error: 'MTD_OPS_AUTO_OOB' undeclared here (not in a function)
mtd.c:35:4: error: 'MTD_OPS_RAW' undeclared here (not in a function)
mtd.c:47:4: error: 'MTD_MLCNANDFLASH' undeclared here (not in a function)
So I suppose it would be safer to provide a local copy.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20120404/91a37d44/attachment.bin>
More information about the Strace-devel
mailing list