Skip to content
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

move error messages to hooksets #2314

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Commits on Jun 14, 2023

  1. libmount: rewrite how syscall status is stored

    This patch introduces "failure save". The syscall status is subset of
    the saved failure, but the failure can be used also for non-syscall
    issues.
    
    * save SYS_* numbers rather than names for syscalls. It will make error
      generators more simple (just switch(cxt->failure_syscall))
    
    * save hookset; it will be later used to call hookset specific error
      message generator
    
    * optionally save "failure command", for example syscall sub-command (FSCONFIG_CMD_*) or
      some hook specific stuff
    
    * optionally save "failure argument" as string (to make error messages
      more human friendly)
    
    * use line and filename in debug message for failures
    
    Note that the way how libmount uses syscall_status is not affected by
    this patch, because this field is used by public API.
    
    Signed-off-by: Karel Zak <kzak@redhat.com>
    karelzak committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    b884a7d View commit details
    Browse the repository at this point in the history
  2. lib/strutils: add errsnprint()

    Signed-off-by: Karel Zak <kzak@redhat.com>
    karelzak committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    21d960c View commit details
    Browse the repository at this point in the history
  3. libmount: move is_shared_tree() to utils.c

    Signed-off-by: Karel Zak <kzak@redhat.com>
    karelzak committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    fec1e0c View commit details
    Browse the repository at this point in the history
  4. libmount: add mkerrmsg callback to mount hook

    It helps to maintain mount syscall-specific error messages on place
    where we use the syscalls.
    
    Signed-off-by: Karel Zak <kzak@redhat.com>
    karelzak committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    51245f8 View commit details
    Browse the repository at this point in the history
  5. libmount: move mount(2) error messages to legacy hook

    Signed-off-by: Karel Zak <kzak@redhat.com>
    karelzak committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    bf83a66 View commit details
    Browse the repository at this point in the history
  6. libmount: add mkerrmsg callback to subdir hook

    Signed-off-by: Karel Zak <kzak@redhat.com>
    karelzak committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    f4d7407 View commit details
    Browse the repository at this point in the history
  7. libmount: improve generic error

    Signed-off-by: Karel Zak <kzak@redhat.com>
    karelzak committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    35f0eaa View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2023

  1. libmount: add add mkerrmsg callback to loopdev hook

    Signed-off-by: Karel Zak <kzak@redhat.com>
    karelzak committed Jun 15, 2023
    Configuration menu
    Copy the full SHA
    1ca9959 View commit details
    Browse the repository at this point in the history