2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
14 static void closehandles()
16 if (nilfh
!= BNULL
) Close(nilfh
);
17 if (nillock
!= BNULL
) UnLock(nillock
);
28 nilfh
= Open("NIL:", MODE_OLDFILE
);
29 TEST((nilfh
!=BNULL
));
32 nilfh
= Open("NIL:", MODE_NEWFILE
);
33 TEST((nilfh
!=BNULL
));
36 nilfh
= Open("NIL:", MODE_READWRITE
);
37 TEST((nilfh
!=BNULL
));
42 nillock
= Lock("NIL:", SHARED_LOCK
);
43 TEST((nillock
== BNULL
));
46 nillock
= Lock("NIL:", EXCLUSIVE_LOCK
);
47 TEST((nillock
== BNULL
));
51 nilfh
= Open("NIL:", MODE_OLDFILE
);
52 nillock
= DupLockFromFH(nilfh
);
55 TEST((nillock
!= BNULL
));
58 nilfh
= OpenFromLock(nillock
);
59 nillock
= BNULL
; /* Lock was consumed when opening */
60 TEST((nilfh
!= BNULL
));
64 nilfh
= Open("NIL:", MODE_OLDFILE
);
65 result
= Write(nilfh
, buffer
, sizeof(buffer
));
66 TEST ((result
== sizeof(buffer
)));
70 nilfh
= Open("NIL:", MODE_OLDFILE
);
71 nillock
= DupLockFromFH(nilfh
);
72 result
= Info(nillock
, NULL
);
77 nilfh
= Open("NIL:", MODE_OLDFILE
);
78 bresult
= ParentOfFH(nilfh
);
79 TEST((bresult
== BNULL
));