@ai-ecoverse/slicc-kernel 1.133.0 → 1.133.2

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/dist/node.js CHANGED
@@ -7403,7 +7403,7 @@ function satisfies(version, range2) {
7403
7403
  }
7404
7404
 
7405
7405
  // src/version.ts
7406
- var KERNEL_VERSION = true ? "1.133.0" : "0.0.0-dev";
7406
+ var KERNEL_VERSION = true ? "1.133.2" : "0.0.0-dev";
7407
7407
  var OS_RELEASE = "6.0.0-slicc";
7408
7408
  function procVersion() {
7409
7409
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -11674,7 +11674,11 @@ var MountFs = class _MountFs {
11674
11674
  }
11675
11675
  }
11676
11676
  async pread(path, offset, length2, version, redirects = 0) {
11677
- const real = await this.follow(path);
11677
+ const gone = (at) => (err) => {
11678
+ const stale = version !== void 0 && err.code === "ENOENT";
11679
+ throw stale ? errnoError("ESTALE", `${at} is gone from the host`) : err;
11680
+ };
11681
+ const real = await this.follow(path).catch(gone(path));
11678
11682
  const found = this.at(real);
11679
11683
  const { pread } = this.base;
11680
11684
  if (!found && pread) {
@@ -11687,7 +11691,7 @@ var MountFs = class _MountFs {
11687
11691
  }
11688
11692
  if (!found) return (await this.base.readFileBuffer(real)).slice(offset, offset + length2);
11689
11693
  const { mount, rel: rel2 } = found;
11690
- if ((await this.table.getattr(mount, real, rel2)).kind === "directory") {
11694
+ if ((await this.table.getattr(mount, real, rel2).catch(gone(real))).kind === "directory") {
11691
11695
  throw errnoError("EISDIR", real);
11692
11696
  }
11693
11697
  await this.table.commitOverlapping(real, offset, length2);
@@ -11699,10 +11703,7 @@ var MountFs = class _MountFs {
11699
11703
  truncate: false,
11700
11704
  exclusive: false,
11701
11705
  ...version !== void 0 ? { ifMatch: version } : {}
11702
- }).catch((err) => {
11703
- const gone = version !== void 0 && err.code === "ENOENT";
11704
- throw gone ? errnoError("ESTALE", `${real} is gone from the host`) : err;
11705
- });
11706
+ }).catch(gone(real));
11706
11707
  const chunk2 = mount.caps.maxIo ?? DEFAULT_IO;
11707
11708
  const chunks2 = [];
11708
11709
  let total = 0;