Skip to content

Commit

Permalink
posix/block: Add major and minor to uevent
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennisbonke committed Oct 23, 2023
1 parent 2c442b2 commit d0ee6df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions posix/subsystem/src/subsystem/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ struct Device final : UnixDevice, drvcore::BlockDevice {
}

void composeUevent(drvcore::UeventProperties &ue) override {
std::pair<int, int> dev = getId();
ue.set("SUBSYSTEM", "block");
ue.set("MAJOR", std::to_string(dev.first));
ue.set("MINOR", std::to_string(dev.second));
}

private:
Expand Down

0 comments on commit d0ee6df

Please sign in to comment.