mirror of
https://frontier.innolan.net/github/amiga-ixemul.git
synced 2026-09-13 13:51:09 +00:00
23 lines
513 B
C
23 lines
513 B
C
|
|
#define _KERNEL
|
|
#include "ixemul.h"
|
|
|
|
ino_t get_unique_id(BPTR lock, void *fh)
|
|
{
|
|
ino_t result;
|
|
|
|
if (fh)
|
|
lock = DupLockFromFH(CTOBPTR(fh));
|
|
if (lock)
|
|
/* The fl_Key field of the FileLock structure is always unique. This is
|
|
also true for filesystems like AFS and AFSFloppy. Thanks to Michiel
|
|
Pelt (the AFS author) for helping me with this. */
|
|
result = (ino_t)((struct FileLock *)(BTOCPTR(lock)))->fl_Key;
|
|
else
|
|
result = (ino_t)fh;
|
|
if (fh)
|
|
UnLock(lock);
|
|
return result;
|
|
}
|
|
|