Commit graph

41 commits

Author SHA1 Message Date
569a0987e2 Add errno.h include directive to glue.c 2024-05-14 20:56:37 -03:00
5de096abde Update docs 2024-05-12 20:01:03 -03:00
af0c4b776f Wrap / unwrap hbsdctrl_ctx_t
Remove unneccessary abstraction
2024-05-12 19:21:23 -03:00
7a43c9c1a0 Bump indent width to 4 2024-05-12 19:11:11 -03:00
e7f1110479 Fix #include directives 2024-05-01 13:15:33 -03:00
545c060fec Raise SystemCallError instead of RuntimeError 2024-03-30 03:48:26 -03:00
275d622843 Map HBSDCTRL_STATE_(ENABLED|DISABLED) into Ruby
And fix `BSD::Control::Feature#disable!`.
2024-03-20 21:58:18 -03:00
aa55d2855d No need to link against sbuf anymore 2024-03-20 21:36:41 -03:00
d91ff80036 Update context.h 2024-03-20 19:15:44 -03:00
427165d1b7 Add BSD::Control::Feature#sysdef! 2024-03-20 18:34:15 -03:00
a34066c47b New project name: bsdcontrol.rb 2024-03-20 17:34:28 -03:00
1d6fe41d39 bsdcontrol_feature_set: don't forget to close 'fd'. 2024-03-20 17:26:02 -03:00
c88d5afb10 Raise rb_eSystemCallError in case errno has not been set 2024-03-20 17:24:10 -03:00
9f6eb714dc Verify 'path' is a Ruby string 2024-03-20 17:13:35 -03:00
3528765df4 Reimplement on top of libhbsdcontrol v2 2024-03-20 16:26:58 -03:00
a67db2277d Reset errno before system calls 2024-03-10 11:19:45 -03:00
b6e28f02b0 Update BSD::Control::Feature#sysdef! 2024-03-10 11:18:14 -03:00
04af09b700 Cleanup 2024-03-10 10:57:39 -03:00
e311d78c7c Apply diff for patch 2024-03-09 19:48:05 -03:00
a86304783f Prefer strncmp over strcmp 2024-03-08 04:24:41 -03:00
e03b68dd0c Fix typo 2024-03-08 04:21:35 -03:00
a58bb5556d Avoid repetition. 2024-03-08 04:12:48 -03:00
d9042ce213 FFI.reset -> FFI.sysdef! 2024-03-08 01:19:05 -03:00
4eaf98b9bc Add BSD::Control::Feature#status 2024-03-07 23:55:41 -03:00
ecf0395a2f Add __set, __rb_eError 2024-03-07 22:20:26 -03:00
6ea77f862f Feature#set!: Verify the given path exists 2024-03-07 20:30:36 -03:00
f95ea4e8f4 Organize C functions by module / class 2024-03-07 18:06:55 -03:00
073c7f465b Add .styleguide.cfg 2024-03-07 01:34:34 -03:00
b690b4fcc6 Always call hbsdcontrol_extattr_rm_attr twice. 2024-03-06 21:28:19 -03:00
c3874d7dae Re-add Feature#sysdef! 2024-03-06 20:59:54 -03:00
bd0d8c4cd9 Remove SysDef 2024-03-06 16:48:41 -03:00
c458d0cadc s/bsd_eError/get_rb_eError/g 2024-03-01 16:51:40 -03:00
50a5d52353 Require root privileges to enable/disable/sysdef a feature 2024-03-01 16:39:27 -03:00
b9eb342c84 Define BSD::Control::Feature#set! as private 2024-03-01 16:19:29 -03:00
6990d4b16b Cast to Ruby integers 2024-03-01 12:05:52 -03:00
4a937f9519 Move ffi_library_version 2024-03-01 01:35:49 -03:00
2db227b0c3 Add BSD::Control.library_version 2024-03-01 01:28:54 -03:00
348dde1150 Define constants on BSD::Control 2024-02-29 23:44:23 -03:00
9f263d79f2 Feature#name could be anything 2024-02-29 23:10:28 -03:00
d66df7f0b8 Raise an error when hbsdcontrol_set_feature_state failes 2024-02-29 22:46:47 -03:00
31977f1df8 First commit 2024-02-29 22:29:43 -03:00