Comments (2)
I am thinking something like
--- a/Applications/util/ps.c
+++ b/Applications/util/ps.c
@@ -472,7 +472,9 @@ int do_ps(void)
close(pfd);
return 1;
}
- ppid_slot[i] = ptab[i].p_tab.p_pptr - ptab[0].p_tab.p_pptr;
+ /* Work out which slot is referenced from the node size as our own ptab struct
+ may not exactly size match the kernel */
+ ppid_slot[i] = ((uint8_t *)ptab[i].p_tab.p_pptr - (uint8_t *)ptab[0].p_tab.p_pptr) / nodesize;
/* Learn our tty internal reference as we go */
if (ptab[i].p_tab.p_status && ptab[i].p_tab.p_pid == pid)
tty = ptab[i].p_tab.p_tty;
might be more robust ?
from fuzix.
That would do definitely do. No sneaky UB. We could also assert if % nodesize
is not 0.
from fuzix.
Related Issues (20)
- rpipico platform is not binary available (yet)? HOT 1
- Fuzix on DK-TM4C129X board won't show "bootdev:." HOT 1
- Suggested memory model for a new port? HOT 4
- Consider Calypsi C99 compiler for 65816 HOT 6
- sleep() and usleep() don't work at all, at least on my raspberry pi pico HOT 4
- FUZIX for Mizar32: Thoughts and hacks so far HOT 6
- Level 3: Port DOOM
- z80 build script recurses HOT 1
- esp32 build HOT 4
- Additional display modes: PicoDVI
- New target: Raspberry Pi/Pi Zero HOT 1
- rpipico platform not working HOT 11
- BUILD_REQUIREMENTS.md for 8080 outdated? HOT 1
- Building for v8080 fails HOT 17
- advent reports read: success and then bus error on 68000
- vile and fleamacs visual issues
- platform-rpipico missing version.c HOT 1
- Add ar and ftruncate() HOT 1
- ZX series machines have a weird video corruption overwriting an extra byte we need to find
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuzix.