2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
9 #include <aros/debug.h>
10 #include "dos_intern.h"
13 /*****************************************************************************
16 #include <exec/types.h>
17 #include <proto/dos.h>
19 AROS_LH1(BPTR
, ParentDir
,
22 AROS_LHA(BPTR
, lock
, D1
),
25 struct DosLibrary
*, DOSBase
, 35, Dos
)
28 Returns a lock to the parent directory of the supplied lock.
31 lock - Lock to get parent directory of.
34 Returns a lock to the parent directory or NULL, in which case the
35 supplied lock has no parent directory (because it is the root
36 directory) or an error occured. IoErr() returns 0 in the former case
37 and a different value on error.
49 *****************************************************************************/
53 struct FileLock
*fl
= BADDR(lock
);
54 D(bug("[ParentDir] lock=%x\n", lock
));
55 return (BPTR
)dopacket1(DOSBase
, NULL
, fl
->fl_Task
, ACTION_PARENT
, lock
);