summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_alq.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-04-16 12:12:27 +0000
committerrwatson <rwatson@FreeBSD.org>2005-04-16 12:12:27 +0000
commit04a7b2d37985e5ded07762fa186128aa3185b37c (patch)
tree790777ea9dc25e1ddaab554028cd53d3ea71c063 /sys/kern/kern_alq.c
parenta5028ef44ecc830d8e8984fab2ad3c77c66a0092 (diff)
downloadFreeBSD-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/kern/kern_alq.c')
-rw-r--r--sys/kern/kern_alq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_alq.c b/sys/kern/kern_alq.c
index c7b7125..3617afe 100644
--- a/sys/kern/kern_alq.c
+++ b/sys/kern/kern_alq.c
@@ -334,8 +334,8 @@ SYSINIT(ald, SI_SUB_LOCK, SI_ORDER_ANY, ald_startup, NULL)
* Create the queue data structure, allocate the buffer, and open the file.
*/
int
-alq_open(struct alq **alqp, const char *file, struct ucred *cred, int size,
- int count)
+alq_open(struct alq **alqp, const char *file, struct ucred *cred, int cmode,
+ int size, int count)
{
struct thread *td;
struct nameidata nd;
@@ -353,7 +353,7 @@ alq_open(struct alq **alqp, const char *file, struct ucred *cred, int size,
NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, file, td);
flags = FWRITE | O_NOFOLLOW | O_CREAT;
- error = vn_open_cred(&nd, &flags, 0, cred, -1);
+ error = vn_open_cred(&nd, &flags, cmode, cred, -1);
if (error)
return (error);
OpenPOWER on IntegriCloud