Displaying 1 result from an estimated 1 matches for "rootfslabel".
Did you mean:
root_label
2007 Jul 24
1
Custom kinit to find device by "label"
...nknown reason. I have tested "kinit" on
Gentoo, and it works fine.
Because of the crash issue, I want to rewrite the program by
modifying kinit and using C. This is where I need help. Here is the
main function that needs to be translated into C:
function FindRootDeviceByLabel(const RootFSLabel: string): boolean;
const
DEV_MAJOR: dev_t = 8;
DEV_MODE: mode_t = S_IFBLK or &0660;
var
ActualFSLabel: string;
FileDescriptor: cint;
ReadBytes: TsSize;
DeviceFound: boolean;
dev_minor: dev_t;
begin
Result := False;
SetLength(ActualFSLabel, Length(RootFSLabel));
//loop throu...