feat: fstat now handle symbolic link
[lunaix-os.git] / lunaix-os / hal / rng / rngx86.c
index bb069d7f61d13025f05ad19a05abd248e360b343..f398c662a0cb87c13666ec29ae872d34cf058098 100644 (file)
@@ -31,7 +31,7 @@ __rand_rd(struct device* dev, void* buf, size_t offset, size_t len)
 int
 pdev_randdev_init(struct device_def* devdef)
 {
-    struct device* devrand = device_addseq(NULL, NULL, "rand");
+    struct device* devrand = device_addseq(NULL, &devdef->class, NULL, "rand");
     devrand->ops.read = __rand_rd;
     devrand->ops.read_page = __rand_rd_pg;
 
@@ -39,7 +39,7 @@ pdev_randdev_init(struct device_def* devdef)
 }
 
 static struct device_def devrandx86_def = {
-    .name = "null",
+    .name = "x86 On-Chip RNG",
     .class = DEVCLASS(DEVIF_SOC, DEVFN_CHAR, DEV_RNG, 0),
     .init = pdev_randdev_init
 };