Browse Source

修复get_random一个问题,添加Held配置文件 (#583)

GnoCiYeH 1 year ago
parent
commit
4374bd1d11
2 changed files with 24 additions and 1 deletions
  1. 1 1
      kernel/src/syscall/misc.rs
  2. 23 0
      user/dadk/config/held-0.1.0.dadk

+ 1 - 1
kernel/src/syscall/misc.rs

@@ -77,7 +77,7 @@ impl Syscall {
         while count < len {
             let rand = rand();
             for offset in 0..4 {
-                ret.push(rand >> (offset * 2));
+                ret.push((rand >> (offset * 2)) as u8);
                 count += 1;
             }
         }

+ 23 - 0
user/dadk/config/held-0.1.0.dadk

@@ -0,0 +1,23 @@
+{
+  "name": "Held",
+  "version": "0.1.0",
+  "description": "中断文本编辑器",
+  "task_type": {
+    "BuildFromSource": {
+      "Git": {
+        "url" : "https://git.mirrors.dragonos.org.cn/DragonOS-Community/Held.git",
+        "revision": "76304e995f"
+      }
+    }
+  },
+  "depends": [],
+  "build": {
+    "build_command": "make install-dragonos"
+  },
+  "clean": {
+    "clean_command": "make clean"
+  },
+  "install": {
+    "in_dragonos_path": "/"
+  }
+}