X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fvol%2Fihandle.c;h=8b053b37a28dd4a89368a518ae48f7d64d632fdd;hp=178d6b0350c49ca2e3714df8d718a592034f6a6b;hb=9cf9a0e978ece2b0afb8ba5947455f307a424cab;hpb=a04071e7940b26dc2a29ac3f0952b10321e7b786 diff --git a/src/vol/ihandle.c b/src/vol/ihandle.c index 178d6b0..8b053b3 100644 --- a/src/vol/ihandle.c +++ b/src/vol/ihandle.c @@ -1095,3 +1095,18 @@ ih_pwrite(int fd, const void * buf, size_t count, afs_foff_t offset) return OS_WRITE(fd, buf, count); } #endif /* !HAVE_PIO */ + +#ifndef AFS_NT40_ENV +int +ih_isunlinked(int fd) +{ + struct afs_stat_st status; + if (afs_fstat(fd, &status) < 0) { + return -1; + } + if (status.st_nlink < 1) { + return 1; + } + return 0; +} +#endif /* !AFS_NT40_ENV */