On Mon, Nov 30, 2009 at 03:50:19PM -0500, Jeff Mahoney wrote:
> This patch adds support for blkdev_ioctl()-handled ioctls.

I have a couple of questions about your patch.

> [...]
> --- /dev/null
> +++ b/block.c
> @@ -0,0 +1,221 @@
> +#include "defs.h"
> +#ifdef LINUX
> +#include <stdint.h>
> +#include <linux/blkpg.h>
> +#include <linux/fs.h>
> +#include <linux/hdreg.h>
> +#include <linux/blktrace_api.h>

Are you sure that every linux system provides these header files?

> [...]
> +static void
> +print_blkpg_req(struct tcb *tcp, struct blkpg_ioctl_arg *blkpg)
> +{
> +     struct blkpg_partition p;
> +     if (!(blkpg->op == BLKPG_ADD_PARTITION ||
> +           blkpg->op == BLKPG_DEL_PARTITION)) {
> +             tprintf("{%d, <invalid>", blkpg->op);
> +             return;
> +     }
> +
> +     tprintf("{%s, ", blkpg->op == BLKPG_ADD_PARTITION ?
> +             "BLKPG_ADD_PARTITION" : "BLKPG_DEL_PARTITION");
> +     tprintf("flags=%d, datalen=%d, ", blkpg->flags, blkpg->datalen);

Please define an xlat structure and use xlookup() instead of these
comparisons.


-- 
ldv

Attachment: pgpXe62oOYyOG.pgp
Description: PGP signature

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to