In article <[email protected]>,
Alexander Nasonov  <[email protected]> wrote:
>-=-=-=-=-=-
>
>Hi,
>Can I commit the patches from my kern/42030?

> static void
>+ktrexecfd(struct ktr_execfd *ktr)
>+{
>+      static const char *dnames[] = { DTYPE_NAMES };
>+      const size_t dnames_sz = sizeof(dnames) / sizeof(dnames[0]);
>+      if (ktr->ktr_dtype > 0 && ktr->ktr_dtype < dnames_sz)

This is just:

        if (ktr->ktr_dtype < __arraycount(dnames))
>+              printf("%s %d\n", dnames[ktr->ktr_dtype], ktr->ktr_fd);
>+      else
>+              printf("%d\n", ktr->ktr_fd);

I would print:
                printf("%d *%u*\n", ktr->ktr_fd, ktr->ktr_dtype);


Looks good to me.

christos

Reply via email to