diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-04-04 18:17:54 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-04-05 13:40:08 +0200 |
commit | e27425e63392683b85101961489a83e0abef133b (patch) | |
tree | 19f3df8c48ab61a069fa661c5973af8ee6925678 /libdiskfs/diskfs.h | |
parent | f274c66b2141aca0f332e272b77cd0a048cef7f6 (diff) | |
download | hurd-e27425e63392683b85101961489a83e0abef133b.tar.gz hurd-e27425e63392683b85101961489a83e0abef133b.tar.bz2 hurd-e27425e63392683b85101961489a83e0abef133b.zip |
libdiskfs: fix receiver lookup
* libdiskfs/Makefile (exec_startup-MIGSFLAGS): New variable.
* libdiskfs/diskfs.h (struct bootinfo): New struct declaration.
(diskfs_begin_using_bootinfo_port): New function.
(diskfs_end_using_bootinfo): Likewise.
* libdiskfs/fsmutations.h: Add mutators for exec_startup_t.
* libdiskfs/priv.h (bootinfo_t): New type declaration to appease mig.
* libdiskfs/boot-start.c (S_exec_startup_get_info): Fix receiver lookup.
Diffstat (limited to 'libdiskfs/diskfs.h')
-rw-r--r-- | libdiskfs/diskfs.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index 359b11b8..8151ddc1 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -126,6 +126,11 @@ struct diskfs_control struct port_info pi; }; +struct bootinfo +{ + struct port_info pi; +}; + /* Possibly lookup types for diskfs_lookup call */ enum lookup_type { @@ -801,9 +806,11 @@ void diskfs_finish_protid (struct protid *cred, struct iouser *user); extern struct protid * diskfs_begin_using_protid_port (file_t port); extern struct diskfs_control * diskfs_begin_using_control_port (fsys_t port); +extern struct bootinfo *diskfs_begin_using_bootinfo_port (exec_startup_t port); extern void diskfs_end_using_protid_port (struct protid *cred); extern void diskfs_end_using_control_port (struct diskfs_control *cred); +extern void diskfs_end_using_bootinfo (struct bootinfo *upt); #if defined(__USE_EXTERN_INLINES) || defined(DISKFS_DEFINE_EXTERN_INLINE) @@ -823,6 +830,14 @@ diskfs_begin_using_control_port (fsys_t port) return ports_lookup_port (diskfs_port_bucket, port, NULL); } +/* And for the exec_startup interface. */ +DISKFS_EXTERN_INLINE struct bootinfo * +diskfs_begin_using_bootinfo_port (exec_startup_t port) +{ + return ports_lookup_port (diskfs_port_bucket, port, diskfs_execboot_class); +} + + /* Called by MiG after server routines have been run; this balances begin_using_protid_port, and is arranged for the io and fs interfaces by fsmutations.h. */ @@ -841,6 +856,14 @@ diskfs_end_using_control_port (struct diskfs_control *cred) ports_port_deref (cred); } +/* And for the exec_startup interface. */ +DISKFS_EXTERN_INLINE void +diskfs_end_using_bootinfo (struct bootinfo *b) +{ + if (b) + ports_port_deref (b); +} + #endif /* Use extern inlines. */ /* Called when a protid CRED has no more references. (Because references\ |