Commit Graph

20535 Commits

Author SHA1 Message Date
christos ea988183cf PR/56622: Walter Lozano: Improve readline compatibility by adding
rl_readline_state support.
2022-01-31 14:44:49 +00:00
christos af918e051e Add more refreshes from Walter Lozano. The readline example in
http://www.mcld.co.uk/blog/2009/simple-gnu-readline-callback-style-example.html
still does not work, but it is better.
2022-01-29 20:52:45 +00:00
tnn 64af69d8bc librefuse: default_log_func is __printflike 2022-01-29 00:03:41 +00:00
andvar 7c674e8e6e remove double t from targeted, add missing r to arbitrary
And fix few more typos along the way in comments and man pages.
2022-01-26 11:48:53 +00:00
blymn f1942931a2 Correct (hopefully) the handling of wide characters.
* Remove the WCOL family of macros, these were "stealing" the upper bits
  of a character attribute to store the column width of a character.  No
  warning was given about this in curses.h which meant it was easy to
  accidentally reuse the bits in use by the WCOL macros (we already did).
  Add couple of 16bit ints to the character structure iff HAVE_WCHAR is
  true to hold the display width and wide char related flags (just
  continuation at the moment)
* Convert all instances of WCOL macros to just reference the column width
  in the char structure so it is not obfuscated.
* Fix cursor positioning so placing a cursor in the middle of a wide char
  actually does just that.
* Fix plod so it understands that if the cursor is going to be positioned
  in the middle of a wide char it cannot just reprint the char to get there.
* Fix plodput so it correctly counts the number of output characters for
  wide characters.
* Fix slk routines to properly size the wctomb() buffer.
2022-01-25 03:05:06 +00:00
andvar 492c086f0a s/begining/beginning/ in comments and messages. 2022-01-24 09:14:36 +00:00
rillig 5d27a0722d librefuse: fix lint warnings about void function returning a value
lib/librefuse/refuse_compat.c(155):
    error: void function fuse_unmount cannot return value [213]
lib/librefuse/refuse/v30.c(57):
    error: void function fuse_destroy_v30 cannot return value [213]
2022-01-23 21:07:28 +00:00
pho b2cb7fcce3 Use sysconf(_SC_PAGESIZE) instead of PAGE_SIZE
It broke build on platforms where PAGE_SIZE was not defined in
<machine/vmparam.h>.
2022-01-22 13:25:55 +00:00
pho ec9afb4282 lib/librefuse: Implement all sorts of compat tweaks to appease various file systems
ReFUSE now supports all the FUSE API variants from FUSE 1.1 to FUSE
3.10. Sorry for the freaking giant patch. I could not break it down
any further.
2022-01-22 08:09:39 +00:00
pho a7ce7be0fd Zero-clear the fuse_context in fuse_destroy(3) 2022-01-22 08:07:02 +00:00
pho e9501242bf Add some missing struct fields, structs, and constants that are part of the API 2022-01-22 08:06:21 +00:00
pho d61ee2ebc0 Support the FUSE option -ho
It is supposed to print a help message without the usage
line. Although it is deprecated and has been removed as of FUSE 3.0,
filesystems in the wild still use it.
2022-01-22 08:05:35 +00:00
pho fb59fa675b Implement some missing functions that are part of the API 2022-01-22 08:03:32 +00:00
pho 9733de6685 Correct the wrong prototype of fuse_daemonize(3) while retaining ABI compatibility 2022-01-22 08:02:49 +00:00
pho 8a6bfb22b5 Cosmetic changes 2022-01-22 08:01:50 +00:00
pho a045b4fd1a Change the way how FUSE_*_VERSION are handled
* FUSE_MAKE_VERSION(maj, min) now generates a 3-digits number if the
  version is higher than 3.9. This is needed to support FUSE 3.10 API.

* FUSE_{MAJOR,MINOR}_VERSION no longer have a fixed value but are
  derived from FUSE_USE_VERSION specified by the user code. This is
  needed to support more FUSE filesystems in the wild.
2022-01-22 08:01:12 +00:00
pho b40bd486c8 Implement a dummy pathconf() which always returns EINVAL 2022-01-22 08:00:17 +00:00
pho 12c809c691 Do not call fuse_operations.getattr() before initializing filesystem 2022-01-22 07:59:33 +00:00
pho c68139a4b6 Increase the warning level to spot more mistakes 2022-01-22 07:58:32 +00:00
pho a95017a87a lib/librefuse: Add support for legacy types and functions 2022-01-22 07:57:30 +00:00
pho 97dc09a69d lib/librefuse: Add stub functions for FUSE polling API 2022-01-22 07:56:15 +00:00
pho ce847e0a0b lib/librefuse: Implement data buffer API appeared on FUSE 2.9 2022-01-22 07:54:56 +00:00
pho 9f39150738 lib/librefuse: Implement FUSE session API and its signal handling functionality 2022-01-22 07:53:05 +00:00
pho 153b9c141b lib/librefuse: Implement logging API appeared on FUSE 3.7 2022-01-22 07:38:45 +00:00
pho 0585557a98 Allow calling puffs_mount(3) before puffs_daemon(3)
puffs_daemon(3) creates a pipe before forking, and the parent process
waits for the child to either complete puffs_mount(3) or fail. If a
user calls puffs_daemon(3) after puffs_mount(3), the function
deadlocks. While this error-reporting functionality is really a nice
thing to have, deadlocking is not great. If the filesystem has already
been mounted, puffs_mount(3) should just daemonize the process and
return.

This became an issue because fuse_daemonize(3) in FUSE API had no such
requirement and some FUSE filesystems in the wild suffered deadlocks.
2022-01-22 07:35:26 +00:00
christos 0f6437ba99 PR/56640: Kimmo Suominen: Correct HISTORY section. 2022-01-17 17:56:48 +00:00
rillig fba4f6e3e8 libpam: remove stray semicolon
No binary change.
2022-01-16 10:52:18 +00:00
rillig 7af2475f78 libcurses: remove unreachable statements
Found by lint.

No binary change.
2022-01-16 10:30:45 +00:00
christos daa505a92e Don't use __printflike, use the explicit attribute so that this works outside
NetBSD.
2022-01-14 13:31:05 +00:00
tnn 27a90dcd8a libedit: rl_message: annotate __printflike 2022-01-14 12:48:30 +00:00
christos b7e56637d9 PR/56618: Walter Lozano: Improve libedit compatibility with readline by
implementing:

    rl_copy_text, rl_erase_empty_line, rl_message, rl_on_new_line,
    rl_replace_line, rl_restore_prompt, rl_save_prompt
2022-01-11 18:30:15 +00:00
christos 68f6d39511 read the ps arguments from the correct place. 2022-01-10 20:04:01 +00:00
christos 104ea67795 Get rid of usrstack/USRSTACK. Document that the old version of getargv is
broken because of ASLR.
2022-01-10 19:51:30 +00:00
blymn 47946660f2 Revert change for array definition, it was incorrect, thanks Uwe. 2022-01-06 20:50:18 +00:00
blymn ebe5c3e633 Properly size and array to hold the larget return from wctomb. 2022-01-06 06:18:13 +00:00
andvar 1f6edd928c s/compnent/component/ 2022-01-04 22:10:08 +00:00
uwe bcb93c2ab4 exec(3): execlpe() first argument should be named "file"
"path" arguments are names used as-is, "file" arguments to "p"
functions are used to construct the pathname using $PATH if necessary.
2022-01-04 20:01:52 +00:00
uwe b4852c3567 getopt_long(3): "index" is an argument, not a field. 2022-01-04 19:36:16 +00:00
uwe 868269f7b0 getopt_long(3): use NULL, not 0, for flag in the example. 2022-01-04 19:32:16 +00:00
uwe f139c7cd08 ptsname(3): fix equivalence example
The buffer is static, don't make it appear that we are returning a
pointer to a local variable.
2022-01-02 03:46:40 +00:00
christos 8a3a1ac9a9 zero out the tzh structure to fix reproducibile builds. 2022-01-01 21:01:21 +00:00
msaitoh 988ab2c9fa s/sytem/system/ 2022-01-01 10:32:28 +00:00
msaitoh 777518dc50 s/implemenation/implementation/ in comment. 2022-01-01 08:34:34 +00:00
andvar 3746949308 fix few typos in comments, mainly in word "parameter". 2021-12-31 20:22:48 +00:00
uwe 017b38e5d1 curses: spell "foreground" correctly in comments 2021-12-17 03:50:18 +00:00
blymn 395d5f8537 Fix for PR lib/56298
Remove the DIAGASSERT for str being NULL in the puts/putp functions,
add protection so that the functions just return OK if str is NULL.
This prevents the assert firing when libcurses passes through a NULL
due to an undefined terminfo entry.
2021-12-15 21:07:12 +00:00
andvar 0e6a3361ec fix typos in word "request(s)". 2021-12-12 09:00:07 +00:00
andvar eb03b08ccf fix typos in word "operation(s)". 2021-12-12 08:49:57 +00:00
mrg d914a3c1b9 remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line.  again.  (i did this in 2008 and then
did not update all of my personal templates.)
2021-12-11 19:24:18 +00:00
andvar cbf5c65aff s/occured/occurred/ in comments, log messages and man pages. 2021-12-10 20:36:02 +00:00