Opened 7 years ago

Closed 7 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:
Has a Patch: yes Platform: All

Description

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 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by pdziepak

Has a Patch: set

comment:2 Changed 7 years ago by anevilyak

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 <.

Changed 7 years ago by pdziepak

comment:3 Changed 7 years ago by pdziepak

Keywords: gsoc2012 added

comment:4 Changed 7 years ago by bonefish

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.