[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/6] hurd_add_RPC
From: |
Svante Signell |
Subject: |
[PATCH 5/6] hurd_add_RPC |
Date: |
Thu, 22 Jan 2015 10:29:56 +0100 |
hurd/ChangeLog
2014-08-21 Svante Signell <svante.signell@gmail.com>
* fs.defs: Added description.
* hurd_types.defs: Make struct flock_t seven integers long since
l_start and l_len are 64bit.
* hurd_types.h: typedef flock_t as flock64.
2001-04-10 Neal H Walfield <neal@cs.uml.edu>
* fs.defs: New rpc file_record_lock.
* hurd_types.defs: Import <fcntl.h>.
---
hurd/fs.defs | 9 +++++++++
hurd/hurd_types.defs | 4 +++-
hurd/hurd_types.h | 2 +-
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/hurd/fs.defs b/hurd/fs.defs
index a4a48cc..40ac0da 100644
--- a/hurd/fs.defs
+++ b/hurd/fs.defs
@@ -371,3 +371,12 @@ routine file_get_source (
file: file_t;
RPT
out source: string_t);
+
+/* Do fcntl type locking on FILE. CMD is from the set
+ F_GETLK64, F_SETLK64, F_SETLKW64. FLOCK64 is passed
+ by the user and is as defined by <fcntl.h>. */
+routine file_record_lock (
+ file: file_t;
+ RPT
+ cmd: int;
+ inout flock64: flock_t);
diff --git a/hurd/hurd_types.defs b/hurd/hurd_types.defs
index 5fa59f3..dd134a6 100644
--- a/hurd/hurd_types.defs
+++ b/hurd/hurd_types.defs
@@ -372,7 +372,7 @@ type idarray_t = array[] of uid_t;
type rusage_t = struct[18] of int; /* XXX */
-type flock_t = struct[5] of int;
+type flock_t = struct[7] of int; /* l_start and l_len are 64 bit */
type timespec_t = struct[2] of int;
@@ -386,3 +386,5 @@ import <sys/statfs.h>;
import <sys/resource.h>;
import <sys/utsname.h>;
import <hurd/hurd_types.h>;
+import <fcntl.h>;
+
diff --git a/hurd/hurd_types.h b/hurd/hurd_types.h
index 4341177..a779a1a 100644
--- a/hurd/hurd_types.h
+++ b/hurd/hurd_types.h
@@ -64,7 +64,7 @@ typedef pid_t *pidarray_t;
typedef uid_t *idarray_t;
typedef loff_t *off_array_t;
typedef struct rusage rusage_t;
-typedef struct flock flock_t;
+typedef struct flock64 flock_t;
typedef struct utsname utsname_t;
#if _FILE_OFFSET_BITS == 64
typedef struct stat io_statbuf_t;
--
2.1.4