@ai-ecoverse/slicc-kernel 1.117.5 → 1.118.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/driver-worker.js +4 -1
- package/dist/driver-worker.js.map +2 -2
- package/dist/driver.js +4 -1
- package/dist/driver.js.map +2 -2
- package/dist/index.js.map +2 -2
- package/dist/kernel-worker.js +28 -5
- package/dist/kernel-worker.js.map +2 -2
- package/dist/node-driver-worker.js +4 -1
- package/dist/node-driver-worker.js.map +2 -2
- package/dist/node-process-worker.js +1 -1
- package/dist/node.js +28 -5
- package/dist/node.js.map +2 -2
- package/dist/process-worker.js +1 -1
- package/dist/types/mount/driver.d.ts +1 -0
- package/dist/types/mount/fsa.d.ts +1 -1
- package/dist/types/mount/medium.d.ts +1 -1
- package/dist/types/mount/protocol.d.ts +5 -1
- package/package.json +1 -1
package/dist/kernel-worker.js
CHANGED
|
@@ -6364,7 +6364,7 @@ function satisfies(version, range2) {
|
|
|
6364
6364
|
}
|
|
6365
6365
|
|
|
6366
6366
|
// src/version.ts
|
|
6367
|
-
var KERNEL_VERSION = true ? "1.
|
|
6367
|
+
var KERNEL_VERSION = true ? "1.118.0" : "0.0.0-dev";
|
|
6368
6368
|
var OS_RELEASE = "6.0.0-slicc";
|
|
6369
6369
|
function procVersion() {
|
|
6370
6370
|
return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
|
|
@@ -9820,7 +9820,7 @@ var FifoTable = class {
|
|
|
9820
9820
|
};
|
|
9821
9821
|
|
|
9822
9822
|
// src/mount/protocol.ts
|
|
9823
|
-
var DRIVER_PROTOCOL = [1,
|
|
9823
|
+
var DRIVER_PROTOCOL = [1, 3];
|
|
9824
9824
|
function driverVersionError(theirs) {
|
|
9825
9825
|
const major = Array.isArray(theirs) ? theirs[0] : void 0;
|
|
9826
9826
|
if (major === DRIVER_PROTOCOL[0]) return void 0;
|
|
@@ -10132,11 +10132,12 @@ function inodeless(mount, attr2) {
|
|
|
10132
10132
|
}
|
|
10133
10133
|
function statOf(attr2, path, mount) {
|
|
10134
10134
|
const mtime = new Date(attr2.mtime);
|
|
10135
|
-
const fallback = attr2.kind === "directory" ? 16877 : attr2.kind === "symlink" ? 41471 : 33188;
|
|
10135
|
+
const fallback = attr2.kind === "directory" ? 16877 : attr2.kind === "symlink" ? 41471 : attr2.kind === "fifo" ? 4516 : 33188;
|
|
10136
10136
|
return {
|
|
10137
10137
|
isFile: attr2.kind === "file",
|
|
10138
10138
|
isDirectory: attr2.kind === "directory",
|
|
10139
10139
|
isSymbolicLink: attr2.kind === "symlink",
|
|
10140
|
+
...attr2.kind === "fifo" ? { isFifo: true } : {},
|
|
10140
10141
|
size: attr2.size,
|
|
10141
10142
|
mode: attr2.mode ?? fallback,
|
|
10142
10143
|
mtime,
|
|
@@ -10679,7 +10680,7 @@ var MountFs = class _MountFs {
|
|
|
10679
10680
|
}
|
|
10680
10681
|
const { mount, rel: rel2 } = found;
|
|
10681
10682
|
this.writable(mount, real);
|
|
10682
|
-
if (owner?.fifo)
|
|
10683
|
+
if (owner?.fifo) return this.mkfifo(found, real, owner);
|
|
10683
10684
|
const bytes = typeof content === "string" ? new TextEncoder().encode(content) : content;
|
|
10684
10685
|
if (mount.maxFile > 0 && bytes.length > mount.maxFile) {
|
|
10685
10686
|
throw errnoError(
|
|
@@ -10696,6 +10697,18 @@ var MountFs = class _MountFs {
|
|
|
10696
10697
|
}
|
|
10697
10698
|
}
|
|
10698
10699
|
}
|
|
10700
|
+
async mkfifo(found, real, owner) {
|
|
10701
|
+
const { mount, rel: rel2 } = found;
|
|
10702
|
+
if (!mount.caps.fifos) throw errnoError("EPERM", `${real}: this mount has no FIFOs`);
|
|
10703
|
+
const made2 = await this.driverOwner(found, real, owner, false);
|
|
10704
|
+
await this.table.commit(real);
|
|
10705
|
+
this.table.forget(mount, real);
|
|
10706
|
+
try {
|
|
10707
|
+
await mount.conn.call({ op: "mkfifo", path: rel2, ...made2 });
|
|
10708
|
+
} finally {
|
|
10709
|
+
this.table.forget(mount, real);
|
|
10710
|
+
}
|
|
10711
|
+
}
|
|
10699
10712
|
async writeWhole(mount, real, rel2, bytes, owner) {
|
|
10700
10713
|
await this.table.commit(real);
|
|
10701
10714
|
this.table.forget(mount, real);
|
|
@@ -20883,6 +20896,9 @@ async function dispatch(h, req) {
|
|
|
20883
20896
|
case "link":
|
|
20884
20897
|
if (!h.link) throw fsError2("EPERM", "this file system has no hard links");
|
|
20885
20898
|
return h.link(req.from, req.to);
|
|
20899
|
+
case "mkfifo":
|
|
20900
|
+
if (!h.mkfifo) throw fsError2("EPERM", "this file system has no FIFOs");
|
|
20901
|
+
return ownerOf2(req) ? h.mkfifo(req.path, ownerOf2(req)) : h.mkfifo(req.path);
|
|
20886
20902
|
case "symlink":
|
|
20887
20903
|
if (!h.symlink) throw fsError2("EPERM", "this file system has no symlinks");
|
|
20888
20904
|
return ownerOf2(req) ? h.symlink(req.target, req.path, ownerOf2(req)) : h.symlink(req.target, req.path);
|
|
@@ -22052,7 +22068,7 @@ function owned3(node, change) {
|
|
|
22052
22068
|
function attr(node) {
|
|
22053
22069
|
return {
|
|
22054
22070
|
kind: node.kind,
|
|
22055
|
-
size: node.kind === "file" ? node.data.size : node.kind === "symlink" ? node.target.length : 4096,
|
|
22071
|
+
size: node.kind === "file" ? node.data.size : node.kind === "symlink" ? node.target.length : node.kind === "fifo" ? 0 : 4096,
|
|
22056
22072
|
mtime: node.mtime,
|
|
22057
22073
|
atime: node.atime,
|
|
22058
22074
|
mode: node.mode,
|
|
@@ -22101,6 +22117,7 @@ function tmpfs() {
|
|
|
22101
22117
|
const existing = dir.children.get(name2);
|
|
22102
22118
|
if (existing && flags2.exclusive) throw fsError2("EEXIST", path);
|
|
22103
22119
|
if (existing?.kind === "directory" && flags2.write) throw fsError2("EISDIR", path);
|
|
22120
|
+
if (existing?.kind === "fifo") throw fsError2("ENXIO", path);
|
|
22104
22121
|
if (existing) return existing;
|
|
22105
22122
|
if (!flags2.create) throw fsError2("ENOENT", path);
|
|
22106
22123
|
const node = make("file", 33188, dir, flags2.owner);
|
|
@@ -22145,6 +22162,11 @@ function tmpfs() {
|
|
|
22145
22162
|
handle(fh);
|
|
22146
22163
|
handles.delete(fh);
|
|
22147
22164
|
},
|
|
22165
|
+
async mkfifo(path, owner) {
|
|
22166
|
+
const { dir, name: name2 } = parent(path);
|
|
22167
|
+
if (dir.children.has(name2)) throw fsError2("EEXIST", path);
|
|
22168
|
+
place(dir, name2, make("fifo", 4516, dir, owner));
|
|
22169
|
+
},
|
|
22148
22170
|
async mkdir(path, owner) {
|
|
22149
22171
|
const { dir, name: name2 } = parent(path);
|
|
22150
22172
|
if (dir.children.has(name2)) throw fsError2("EEXIST", path);
|
|
@@ -24526,6 +24548,7 @@ var Launcher = class {
|
|
|
24526
24548
|
{
|
|
24527
24549
|
symlinks: true,
|
|
24528
24550
|
links: true,
|
|
24551
|
+
fifos: true,
|
|
24529
24552
|
chmod: true,
|
|
24530
24553
|
owners: true,
|
|
24531
24554
|
linkTimes: true,
|