-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add backtrace definitions and support for statvfs #3359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
🎉 All checks have passed 😃 |
|
Done, I've added the new symbols to semver now.
Yes, these are available in the base OS, so they are available on a minimal environment. |
Great, could you squash commits into one too? |
Need to look into it later. |
@JohnTitor I'm not really sure on how to do this as I've synced my fork with master in between my commits. This is how it looks like at my end, Can't you simply use squash and merge at your end? |
Sadly no, we use the bot named |
Add backtrace definitions and support for statvfs android adding few more pthread api calls. Declare `pthread_attr_setguardsize` and `pthread_attr_getstacksize`. Declare `pthread_attr_setguardsize` and `pthread_attr_getstacksize` on all platforms which have `pthread_attr_getguardsize` and `pthread_attr_setstacksize`, respectively. Delete a now-redundant `pthread_attr_getstacksize` declaration. Add symbols Add statvfs also
Some changes occurred in OpenBSD module cc @semarie |
@JohnTitor Is this ok? If not, it's probably easier for me to start from a new fork and do a new pull request. |
Please advice. |
Add backtrace definitions and support for statvfs Replaces #3359 This allows successful build and use of file deletion, a.k.a. _move to trash_ Tested with a source build of `simp` with the **trash** feature enabled. Without this commit, `simp` fails to build on NetBSD when the **trash** feature is enabled. Also, I've added the new symbols to semver and made sure these functions are available on a minimal NetBSD environment.
Add backtrace definitions and support for statvfs Replaces #3359 This allows successful build and use of file deletion, a.k.a. _move to trash_ Tested with a source build of `simp` with the **trash** feature enabled. Without this commit, `simp` fails to build on NetBSD when the **trash** feature is enabled. Also, I've added the new symbols to semver and made sure these functions are available on a minimal NetBSD environment.
backtrace definitions and support for getmntinfo and getvfsstat After the failures of merging #3361 as a follow-up to #3359 I've spent sometime making sure everything is indeed supported and defined. ``` ~> grep -r "MNT_WAIT" /usr/include/sys/fstypes.h; grep -r "MNT_NOWAIT" /usr/include/sys/fstypes.h; grep -r "MNT_LAZY" /usr/include/sys/fstypes.h #define MNT_WAIT 1 /* synchronously wait for I/O to complete */ #define MNT_NOWAIT 2 /* start all I/O, but do not wait for it */ #define MNT_LAZY 3 /* push data not written by filesystem syncer */ ``` ``` ~> grep -r "getmntinfo" /usr/include/sys/; grep -r "getvfsstat" /usr/include/sys/ /usr/include/sys/statvfs.h:int getmntinfo(struct statvfs **, int) /usr/include/sys/statvfs.h: __RENAME(__getmntinfo90); /usr/include/sys/fstypes.h: * waitfor flags to vfs_sync() and getvfsstat() /usr/include/sys/statvfs.h:int getvfsstat(struct statvfs *, size_t, int) /usr/include/sys/statvfs.h: __RENAME(__getvfsstat90); /usr/include/sys/syscall.h:/* syscall: "compat_90_getvfsstat" ret: "int" args: "struct statvfs90 *" "size_t" "int" */ /usr/include/sys/syscall.h:#define SYS_compat_90_getvfsstat 356 /usr/include/sys/syscall.h:/* syscall: "__getvfsstat90" ret: "int" args: "struct statvfs *" "size_t" "int" */ /usr/include/sys/syscall.h:#define SYS___getvfsstat90 483 /usr/include/sys/syscallargs.h:struct compat_90_sys_getvfsstat_args { /usr/include/sys/syscallargs.h:check_syscall_args(compat_90_sys_getvfsstat) /usr/include/sys/syscallargs.h:struct sys___getvfsstat90_args { /usr/include/sys/syscallargs.h:check_syscall_args(sys___getvfsstat90) /usr/include/sys/syscallargs.h:int compat_90_sys_getvfsstat(struct lwp *, const struct compat_90_sys_getvfsstat_args *, register_t *); /usr/include/sys/syscallargs.h:int sys___getvfsstat90(struct lwp *, const struct sys___getvfsstat90_args *, register_t *); ``` Also, I've made sure the code compiles with rustc 1.72.0 without warning or errors. ``` ~> cargo build --release Updating crates.io index Compiling libc v0.2.148 (/home/pin/Git/libc) Finished release [optimized] target(s) in 8.87s ``` Moreover, the _move to trash_ functionality has again been verified using [simp](https://github.com/Kl4rry/simp) compiled with this commit as patch, in combination with the patch submited to [trash-rs](Byron/trash-rs#84). `@JohnTitor` Please give bors another try
This allows successful build and use of file deletion, a.k.a. move to trash
Tested with source build of
simp
with the trash feature enabled.Without this commit,
simp
fails to build on NetBSD when the trash feature is enabled.Moving a file to the trash bin:

Verifying its existence in the trash bin:
