@ai-ecoverse/slicc-kernel 1.185.0 → 1.186.1

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.
@@ -7998,7 +7998,7 @@ var init_version = __esm({
7998
7998
  "src/version.ts"() {
7999
7999
  "use strict";
8000
8000
  init_captured_globals();
8001
- KERNEL_VERSION = true ? "1.185.0" : "0.0.0-dev";
8001
+ KERNEL_VERSION = true ? "1.186.1" : "0.0.0-dev";
8002
8002
  OS_RELEASE = "6.0.0-slicc";
8003
8003
  }
8004
8004
  });
@@ -7997,7 +7997,7 @@ var init_version = __esm({
7997
7997
  "src/version.ts"() {
7998
7998
  "use strict";
7999
7999
  init_captured_globals();
8000
- KERNEL_VERSION = true ? "1.185.0" : "0.0.0-dev";
8000
+ KERNEL_VERSION = true ? "1.186.1" : "0.0.0-dev";
8001
8001
  OS_RELEASE = "6.0.0-slicc";
8002
8002
  }
8003
8003
  });
package/dist/node.js CHANGED
@@ -4917,7 +4917,7 @@ function satisfies(version, range2) {
4917
4917
  }
4918
4918
 
4919
4919
  // src/version.ts
4920
- var KERNEL_VERSION = true ? "1.185.0" : "0.0.0-dev";
4920
+ var KERNEL_VERSION = true ? "1.186.1" : "0.0.0-dev";
4921
4921
  var OS_RELEASE = "6.0.0-slicc";
4922
4922
  function procVersion() {
4923
4923
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -11687,7 +11687,7 @@ function view(target, overrides) {
11687
11687
  }
11688
11688
 
11689
11689
  // src/mount/protocol.ts
11690
- var DRIVER_PROTOCOL = [1, 3];
11690
+ var DRIVER_PROTOCOL = [1, 4];
11691
11691
  function driverVersionError(theirs) {
11692
11692
  const major = Array.isArray(theirs) ? theirs[0] : void 0;
11693
11693
  if (major === DRIVER_PROTOCOL[0]) return void 0;
@@ -12117,7 +12117,7 @@ function statOf2(attr2, path, mount) {
12117
12117
  ino: attr2.ino ?? inodeOf(path),
12118
12118
  ...!inodeless(mount, attr2) && attr2.nlink !== void 0 ? { nlink: attr2.nlink } : {},
12119
12119
  dev: mount.dev,
12120
- ...readonly(mount) ? { readonly: true } : {},
12120
+ ...readonly(mount) || attr2.readonly === true ? { readonly: true } : {},
12121
12121
  ...mount.maxFile > 0 ? { maxFile: mount.maxFile } : {},
12122
12122
  ...mount.caps.ranges ? { ranged: true } : {},
12123
12123
  ...mount.caps.links ? { linkable: true } : {},
@@ -13107,6 +13107,9 @@ var MountFs = class _MountFs {
13107
13107
  this.writable(a.mount, normalizePath(to));
13108
13108
  if (a.mount.caps.links) await this.lstat(from);
13109
13109
  if (!a.mount.caps.links) {
13110
+ if ((await this.lstat(parentOf7(to)).catch(() => void 0))?.readonly) {
13111
+ throw errnoError("EROFS", to);
13112
+ }
13110
13113
  throw errnoError("EPERM", `${from}: this file system has no hard links`);
13111
13114
  }
13112
13115
  await this.table.commitUnder(from);
@@ -13536,10 +13539,7 @@ async function run(entry, path, req) {
13536
13539
  await fs.rm(path, { file: true });
13537
13540
  return done;
13538
13541
  case "rmdir":
13539
- if (!(await fs.lstat(path)).isDirectory) throw syncError("ENOTDIR", path);
13540
- if ((await fs.readdir(path)).length > 0) throw syncError("ENOTEMPTY", path);
13541
- await fs.rm(path, { recursive: true });
13542
- return done;
13542
+ return rmdir(fs, path);
13543
13543
  case "symlink":
13544
13544
  await fs.symlink(req.arg2 ?? "", path, ownerFor(entry));
13545
13545
  return done;
@@ -13822,6 +13822,14 @@ async function copyOp(entry, path, req) {
13822
13822
  entry.fresh?.(to);
13823
13823
  return done;
13824
13824
  }
13825
+ async function rmdir(fs, path) {
13826
+ const st = await fs.lstat(path);
13827
+ if (!st.isDirectory) throw syncError("ENOTDIR", path);
13828
+ if (st.readonly) throw syncError("EROFS", path);
13829
+ if ((await fs.readdir(path)).length > 0) throw syncError("ENOTEMPTY", path);
13830
+ await fs.rm(path, { recursive: true });
13831
+ return done;
13832
+ }
13825
13833
  async function createExclusive(fs, path, owner) {
13826
13834
  if (fs.createExclusive) return fs.createExclusive(path, owner);
13827
13835
  if (await fs.lstat(path).then(
@@ -33901,9 +33909,10 @@ function openInProcess(spec, ports = messageChannel) {
33901
33909
  const driver = spec[IN_PROCESS_DRIVER];
33902
33910
  if (!driver) return void 0;
33903
33911
  const { port1, port2 } = ports();
33904
- driver.served?.(
33905
- serveFilesystem(port2, driver.handlers, driver.capabilities ?? {}, { owned: true })
33906
- );
33912
+ const served2 = serveFilesystem(port2, driver.handlers, driver.capabilities ?? {}, {
33913
+ owned: true
33914
+ });
33915
+ driver.served?.(served2);
33907
33916
  return {
33908
33917
  port: port1,
33909
33918
  dispose: () => {