Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/src/osh/host/osh_priv.h # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / src / osh / host / osh_priv.h` 32 lines ยท 1652 bytes Raw Blame History 1 /* SPDX-License-Identifier: Apache-2.0 2 * Copyright 2026 Drake Stapleton (AIEN / aien-dev) 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /* osh_priv.h -- internal to the Linux host adapter; not part of the adapter interface. */ 18 #ifndef OSH_PRIV_H 19 #define OSH_PRIV_H 20 #include "osh_host.h" 21 22 /* Write "osh: \n" to fd (best effort, full-write loop). */ 23 void osh_diag(int fd, const char *fmt, ...) __attribute__((format(printf, 2, 3))); 24 /* Write all n bytes; 0 ok, -1 with errno set. */ 25 int osh_write_all(int fd, const char *buf, size_t n); 26 /* Run builtin c->builtin_id with io[0..2] as its stdin/out/err. in_parent: effects on the session are real. 27 * Returns the builtin's exit status. May set s->exit_requested (parent only). */ 28 int osh_builtin_run(OshSession *s, const OshCmd *c, const int io[3], int in_parent); 29 /* Gate one effect through s->effect_hook (no hook: allowed). Returns OSH_E_OK, or the denial after writing a named 30 * diagnostic to diagfd (" : denied (NAME); nothing was done"). Call immediately before the syscall. */ 31 int osh_effect_check(const OshSession *s, int op, const char *path, int diagfd); 32 #endif