diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-04-16 12:12:27 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-04-16 12:12:27 +0000 |
commit | 04a7b2d37985e5ded07762fa186128aa3185b37c (patch) | |
tree | 790777ea9dc25e1ddaab554028cd53d3ea71c063 /sys/sys/alq.h | |
parent | a5028ef44ecc830d8e8984fab2ad3c77c66a0092 (diff) | |
download | FreeBSD-src-04a7b2d37985e5ded07762fa186128aa3185b37c.zip FreeBSD-src-04a7b2d37985e5ded07762fa186128aa3185b37c.tar.gz |
Modify the alq(9) alq_open() API to accept a file creation mode, rather
than defaulting the cmode argument to vn_open() to 0. Supply a default
argument of ALQ_DEFAULT_CMODE (0600) in current callers.
Discussed with/pointed out by: hmp
Reveiwed by: jeff, hmp
MFC after: 3 days
Diffstat (limited to 'sys/sys/alq.h')
-rw-r--r-- | sys/sys/alq.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/sys/alq.h b/sys/sys/alq.h index cd8e8d3..bc4961e 100644 --- a/sys/sys/alq.h +++ b/sys/sys/alq.h @@ -53,12 +53,17 @@ struct ale { #define ALQ_NOWAIT 0x0001 #define ALQ_WAITOK 0x0002 +/* Suggested mode for file creation. */ +#define ALQ_DEFAULT_CMODE 0600 + /* * alq_open: Creates a new queue * * Arguments: * alq Storage for a pointer to the newly created queue. * file The filename to open for logging. + * cred Credential to authorize open and I/O with. + * cmode Creation mode for file, if new. * size The size of each entry in the queue. * count The number of items in the buffer, this should be large enough * to store items over the period of a disk write. @@ -66,8 +71,8 @@ struct ale { * error from open or 0 on success */ struct ucred; -int alq_open(struct alq **, const char *file, struct ucred *cred, int size, - int count); +int alq_open(struct alq **, const char *file, struct ucred *cred, int cmode, + int size, int count); /* * alq_write: Write data into the queue |