2 ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 ** Distributed under the terms of the Haiku License.
13 #include <errno_private.h>
17 #define RETURN_AND_SET_ERRNO(status) \
20 __set_errno(status); \
28 dev_for_path(const char *path
)
31 int status
= _kern_read_stat(-1, path
, true, &stat
, sizeof(struct stat
));
35 RETURN_AND_SET_ERRNO(status
);
40 next_dev(int32
*_cookie
)
42 return _kern_next_device(_cookie
);
43 // For some reason, this one returns its error code directly
48 fs_stat_dev(dev_t device
, fs_info
*info
)
50 status_t status
= _kern_read_fs_info(device
, info
);
52 RETURN_AND_SET_ERRNO(status
);