Opened 8 years ago

Closed 8 years ago

#8423 closed enhancement (invalid)

Make load_driver_settings use find_directory

Reported by: pdziepak Owned by: bonefish
Priority: normal Milestone: R1
Component: File Systems/UserlandFS Version: R1/alpha3
Keywords: gsoc2012 Cc:
Blocked By: Blocking:
Platform: All


There is a TODO left in comments that load_driver_settings should use find_directory function which provides proper interface for obtaining system directories paths instead of directly accessing a constant.

Attachments (1)

userlandfs_driver_settings.patch (1.2 KB ) - added by pdziepak 8 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by pdziepak, 8 years ago

patch: 01

comment:2 by anevilyak, 8 years ago

if (find_directory(B_USER_CONFIG_DIRECTORY, (dev_t)-1, false, path, sizeof(path)) < B_OK)

In general, in Haiku code it's preferred to simply use != B_OK for things like this. It's also a good habit to get into partly because in some cases (e.g. more recent POSIX requirements) the rules can differ for the sign of the returned error codes, so you can actually get into trouble by explicitly using <.

by pdziepak, 8 years ago

comment:3 by pdziepak, 8 years ago

Keywords: gsoc2012 added

comment:4 by bonefish, 8 years ago

Resolution: invalid
Status: newclosed

Thanks for the patch, but the source file was obsolete anyway. I removed it in hrev43949.

Note: See TracTickets for help on using tickets.