summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-02-10 20:17:37 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-02-10 20:17:37 +0000
commit730bc97685d4df50c618e36b8a3213b037a7bd6e (patch)
tree7439d60f3f94ab12e756980f7ad3bb45b6402d58 /libdiskfs
parent378175e9cd62a203ef4ba174ad2bb3f8acd7a5d4 (diff)
Initial revision
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/io-owner-get.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/libdiskfs/io-owner-get.c b/libdiskfs/io-owner-get.c
new file mode 100644
index 00000000..6d2bd0fa
--- /dev/null
+++ b/libdiskfs/io-owner-get.c
@@ -0,0 +1,36 @@
+/*
+ Copyright (C) 1994 Free Software Foundation
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include "priv.h"
+#include "io_S.h"
+
+/* Implement io_get_owner as described in <hurd/io.defs>. */
+error_t
+diskfs_S_io_get_owner (struct protid *cred,
+ pid_t *owner)
+{
+ struct node *np;
+
+ if (!cred)
+ return EOPNOTSUPP;
+ np = cred->po->np;
+
+ mutex_lock (&np->lock);
+ *owner = np->owner;
+ mutex_unlock (&np->lock);
+ return 0;
+}