/dev/crypto removal (3bis): DTYPE_CRYPTO

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

/dev/crypto removal (3bis): DTYPE_CRYPTO

Mike Belopuhov-5
I don't know if we recycle them somehow, but just in case...

diff --git sys/sys/file.h sys/sys/file.h
index d98118e..64c0f31 100644
--- sys/sys/file.h
+++ sys/sys/file.h
@@ -67,11 +67,11 @@ struct file {
  short f_flag; /* see fcntl.h */
 #define DTYPE_VNODE 1 /* file */
 #define DTYPE_SOCKET 2 /* communications endpoint */
 #define DTYPE_PIPE 3 /* pipe */
 #define DTYPE_KQUEUE 4 /* event queue */
-#define DTYPE_CRYPTO 5 /* crypto */
+/* was define DTYPE_CRYPTO 5 */
 #define DTYPE_SYSTRACE 6 /* system call tracing */
  short f_type; /* descriptor type */
  long f_count; /* reference count */
  long f_msgcount; /* references from message queue */
  struct ucred *f_cred; /* credentials associated with descriptor */

Reply | Threaded
Open this post in threaded view
|

Re: /dev/crypto removal (3bis): DTYPE_CRYPTO

Philip Guenther-2
On Mon, Aug 18, 2014 at 8:02 AM, Mike Belopuhov <[hidden email]> wrote:

> I don't know if we recycle them somehow, but just in case...
>
> --- sys/sys/file.h
> +++ sys/sys/file.h
>
...

> -#define        DTYPE_CRYPTO    5       /* crypto */
> +/* was define  DTYPE_CRYPTO    5 */
>

When it goes, this is the way to document it, yep.

...but you better delete the code in usr.bin/fstat/fstat.c and
usr.sbin/pstat/pstat.c before that.


Philip
Reply | Threaded
Open this post in threaded view
|

Re: /dev/crypto removal (3bis): DTYPE_CRYPTO

Theo de Raadt
In reply to this post by Mike Belopuhov-5
> > I don't know if we recycle them somehow, but just in case...
> >
> > --- sys/sys/file.h
> > +++ sys/sys/file.h
> >
> ...
>
> > -#define        DTYPE_CRYPTO    5       /* crypto */
> > +/* was define  DTYPE_CRYPTO    5 */
> >
>
> When it goes, this is the way to document it, yep.
>
> ...but you better delete the code in usr.bin/fstat/fstat.c and
> usr.sbin/pstat/pstat.c before that.

I also approve of this way of cleaning up /dev/crypto.  Just do make
builds after every change.