Open() Syscall Logic | 32 Bit OS Dev (in C)

Channel:
Subscribers:
5,840
Published on ● Video Link: https://www.youtube.com/watch?v=lRrRdpQf7v0



Category:
Vlog
Duration: 1:19:49
253 views
10


Writing out the rest of open() logic, thinking through it slowly as I go. Really it's only adding to the open inode table and open file table.
There's probably ~5-7 hours after this one sans editing, to create a file successfully from open() without error. I'll try not to be too slow and boring!

Errata:
- O_RDONLY, O_WRONLY, and O_RDWR are later changed to be 0, 1, and 2 respectively, so that only 1 of these can be active at a time.

OS Dev playlist:
https://www.youtube.com/playlist?list=PLT7NbkyNWaqajsw8Xh7SP9KJwjfpP8TNX

Git Repos:
Sourcehut: https://git.sr.ht/~queso_fuego/quesos
Github mirror: https://github.com/queso-fuego/amateuros

Repo state before open() syscall (this will be updated when open() and creating new files is mostly done):
git clone -n https://github.com/queso-fuego/amateuros
cd amateuros
git checkout 4255fe96f1efb69498eec2a55417dd3eca3eb2de

Join the Community Discord: https://discord.gg/yKm4T89QFn

Contact:
email: fuegoqueso@gmail.com
twitter: @Queso_Fuego
twitch: https://www.twitch.tv/queso_fuego

Next video:
- Adding more helper functions to get inodes, and starting an fs_create_file() function

- Let me know if there's anything specific you'd like to see!

Outline:
0:00 changes since last video
3:36 continue inode_from_path() and syscall_open()
26:13 search & add to open inode table
47:12 add to open file table
1:17:47 wrap up & outro

Questions about setup/software/etc.?
Check the FAQ: https://queso_fuego.srht.site/about.html

Music credits:
Morning Routine by Ghostrifter Official | https://soundcloud.com/ghostrifter-official
Music promoted by https://www.chosic.com/free-music/all/
Creative Commons CC BY-SA 3.0
https://creativecommons.org/licenses/by-sa/3.0/

#osdev #open #syscall







Tags:
queso fuego
osdev
os dev
operating systems
open syscall
low level
systems programming
kernel dev
file system