PNG  IHDR  8] PLTE S =tRNS   PNG  IHDR  8] PLTE S =tRNS   REDROOM
PHP 7.4.33
Preview: _udevadm Size: 8.06 KB
/usr/share/zsh/site-functions/_udevadm

#compdef udevadm
# SPDX-License-Identifier: LGPL-2.1-or-later

(( $+functions[_udevadm_info] )) ||
_udevadm_info(){
    _arguments \
        '--query=[Query the database for specified type of device data. It needs the --path or --name to identify the specified device.]:type:(name symlink path property all)' \
        '--path=[The devpath of the device to query.]:sys files:_files -P /sys/ -W /sys' \
        '--name=[The name of the device node or a symlink to query]:device files:_files -P /dev/ -W /dev' \
        '--root[Print absolute paths in name or symlink query.]' \
        '--attribute-walk[Print all sysfs properties of the specified device that can be used in udev rules to match the specified device]' \
        '--export[Print output as key/value pairs.]' \
        '--export-prefix=[Add a prefix to the key name of exported values.]:prefix' \
        '--device-id-of-file=[Print major/minor numbers of the underlying device, where the file lives on.]:files:_udevadm_mounts' \
        '--export-db[Export the content of the udev database.]' \
        '--cleanup-db[Cleanup the udev database.]' \
        '--value[When showing properties, print only their values.]' \
        '--property=[Show only properties by this name.]'
}

(( $+functions[_udevadm_trigger] )) ||
_udevadm_trigger(){
    _arguments \
        '--verbose[Print the list of devices which will be triggered.]' \
        '--dry-run[Do not actually trigger the event.]' \
        '--quiet[Suppress error logging in triggering events.]' \
        '--type=[Trigger a specific type of devices.]:types:(all devices subsystems failed)' \
        '--action=[Type of event to be triggered.]:actions:(add change remove move online offline bind unbind)' \
        '--subsystem-match=[Trigger events for devices which belong to a matching subsystem.]' \
        '--subsystem-nomatch=[Do not trigger events for devices which belong to a matching subsystem.]' \
        '--attr-match=attribute=[Trigger events for devices with a matching sysfs attribute.]' \
        '--attr-nomatch=attribute=[Do not trigger events for devices with a matching sysfs attribute.]' \
        '--property-match=[Trigger events for devices with a matching property value.]' \
        '--tag-match=property[Trigger events for devices with a matching tag.]' \
        '--sysname-match=[Trigger events for devices with a matching sys device name.]' \
        '--parent-match=[Trigger events for all children of a given device.]' \
        '--initialized-match[Trigger events for devices that are already initialized.]' \
        '--initialized-nomatch[Trigger events for devices that are not initialized yet.]' \
        '--uuid[Print synthetic uevent UUID.]' \
        '--prioritized-subsystem=[Trigger events for devices which belong to a matching subsystem earlier.]'
}

(( $+functions[_udevadm_settle] )) ||
_udevadm_settle(){
    _arguments \
       '--timeout=[Maximum number of seconds to wait for the event queue to become empty.]' \
       '--seq-start=[Wait only for events after the given sequence number.]' \
       '--seq-end=[Wait only for events before the given sequence number.]' \
       '--exit-if-exists=[Stop waiting if file exists.]:files:_files' \
       '--quiet[Do not print any output, like the remaining queue entries when reaching the timeout.]' \
       '--help[Print help text.]'
}

(( $+functions[_udevadm_control] )) ||
_udevadm_control(){
    _arguments \
        '--exit[Signal and wait for systemd-udevd to exit.]' \
        '--log-priority=[Set the internal log level of systemd-udevd.]:priorities:(err info debug)' \
        '--stop-exec-queue[Signal systemd-udevd to stop executing new events. Incoming events will be queued.]' \
        '--start-exec-queue[Signal systemd-udevd to enable the execution of events.]' \
        '--reload[Signal systemd-udevd to reload the rules files and other databases like the kernel module index.]' \
        '--property=[Set a global property for all events.]' \
        '--children-max=[Set the maximum number of events.]' \
        '--timeout=[The maximum number of seconds to wait for a reply from systemd-udevd.]' \
        '--help[Print help text.]'
}

(( $+functions[_udevadm_monitor] )) ||
_udevadm_monitor(){
    _arguments \
        '--kernel[Print the kernel uevents.]' \
        '--udev[Print the udev event after the rule processing.]' \
        '--property[Also print the properties of the event.]' \
        '--subsystem-match=[Filter events by subsystem/\[devtype\].]' \
        '--tag-match=[Filter events by property.]' \
        '--help[Print help text.]'
}

(( $+functions[_udevadm_test] )) ||
_udevadm_test(){
    _arguments \
        '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \
        '--subsystem=[The subsystem string.]' \
        '--help[Print help text.]' \
        '*::devpath:_files -P /sys/ -W /sys'
}

(( $+functions[_udevadm_test-builtin] )) ||
_udevadm_test-builtin(){
    if (( CURRENT == 2 )); then
    _arguments \
        '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \
        '--help[Print help text]' \
        '*::builtins:(blkid btrfs hwdb input_id net_id net_setup_link kmod path_id usb_id uaccess)'
    elif  (( CURRENT == 3 )); then
        _arguments \
            '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \
            '--help[Print help text]' \
            '*::syspath:_files -P /sys -W /sys'
    else
        _arguments \
            '--action=[The action string.]:actions:(add change remove move online offline bind unbind)' \
            '--help[Print help text]'
    fi
}

(( $+functions[_udevadm_wait] )) ||
_udevadm_wait(){
    _arguments \
        '--timeout=[Maximum number of seconds to wait for the devices being created.]' \
        '--initialized=[Wait for devices being initialized by systemd-udevd.]:boolean:(yes no)' \
        '--removed[Wait for devices being removed.]' \
        '--settle[Also wait for udev queue being empty.]' \
        '--help[Print help text.]' \
        '*::devpath:_files -P /dev/ -W /dev'
}

(( $+functions[_udevadm_lock] )) ||
_udevadm_lock(){
    _arguments \
        '--timeout=[Maximum number of seconds to wait for the devices being locked.]' \
        '--device=[Block device to lock.]' \
        '--backing=[File whose backing block device to lock.]' \
        '--print[Only show which block device the lock would be taken on.]' \
        '--help[Print help text.]'
}

(( $+functions[_udevadm_mounts] )) ||
_udevadm_mounts(){
    local dev_tmp dpath_tmp mp_tmp mline

    tmp=( "${(@f)$(< /proc/self/mounts)}" )
    dev_tmp=( "${(@)${(@)tmp%% *}:#none}" )
    mp_tmp=( "${(@)${(@)tmp#* }%% *}" )

    local MATCH
    mp_tmp=("${(@q)mp_tmp//(#m)\\[0-7](#c3)/${(#)$(( 8#${MATCH[2,-1]} ))}}")
    dpath_tmp=( "${(@Mq)dev_tmp:#/*}" )
    dev_tmp=( "${(@q)dev_tmp:#/*}" )

    _alternative \
        'device-paths: device path:compadd -a dpath_tmp' \
        'directories:mount point:compadd -a mp_tmp'
}

(( $+functions[_udevadm_commands] )) ||
_udevadm_commands(){
    local -a _udevadm_cmds
    _udevadm_cmds=(
        'info:query sysfs or the udev database'
        'trigger:request events from the kernel'
        'settle:wait for the event queue to finish'
        'control:control the udev daemon'
        'monitor:listen to kernel and udev events'
        'test:test an event run'
        'test-builtin:test a built-in command'
        'wait:wait for devices or device symlinks being created'
        'lock:lock a block device and run a comand'
    )

    if ((CURRENT == 1)); then
        _describe -t commands 'udevadm commands' _udevadm_cmds
    else
        local curcontext="$curcontext"
        cmd="${${_udevadm_cmds[(r)$words[1]:*]%%:*}}"
        if (($#cmd)); then
            if (( $+functions[_udevadm_$cmd] )); then
                _udevadm_$cmd
            else
                _message "no options for $cmd"
            fi
        else
            _message "no more options"
        fi
    fi
}

_arguments \
    '--debug[Print debug messages to stderr]' \
    '--version[Print version number]' \
    '--help[Print help text]' \
    '*::udevadm commands:_udevadm_commands'

Directory Contents

Dirs: 0 × Files: 28

Name Size Perms Modified Actions
2.84 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
9.36 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
6.18 KB lrw-r--r-- 2024-08-12 18:00:48
Edit Download
1.89 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
14.58 KB lrw-r--r-- 2026-01-28 08:27:23
Edit Download
20.25 KB lrw-r--r-- 2026-03-10 23:36:54
Edit Download
643 B lrw-r--r-- 2024-04-17 17:19:24
Edit Download
2.73 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
7.03 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
779 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
8.18 KB lrw-r--r-- 2021-12-13 03:43:13
Edit Download
3.68 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
6.25 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
120 B lrw-r--r-- 2026-05-05 09:12:24
Edit Download
128 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
505 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
318 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
263 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
19.50 KB lrw-r--r-- 2026-05-05 15:47:58
Edit Download
3.76 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
5.50 KB lrw-r--r-- 2026-05-05 15:44:27
Edit Download
633 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
1.15 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
330 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
4.25 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
744 B lrw-r--r-- 2022-10-31 18:59:18
Edit Download
2.00 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download
8.06 KB lrw-r--r-- 2022-10-31 18:59:18
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).
 !"#$%&'(()*+,-./00123456789 t\ wIDATx ]ys  47Y ƒ -  "  Rv  < f{Ɛ $k l L > L  ~h^ 1  [  r G t& h  l F z3O Y ! p A(_g̷ E8 )S 8 c  Kb"z ~ 5 J xAL WU <  *  5 m;W a pB h ~P J 2 3 6 ҙ .Ƹ P i  4g F R L P ΪK/D  M v (a3 k J Œ4N5* SH ` SdJ z  O J Xՠ V>u ߱ BE&L b2 ?2` tX+  c CB A$ i b C ĀMB E : /  # Dx &l =q Ty  0 \p I ( L Ǎ { e 4k ;`u^ヲ eP!( d {  )T A 8 O;Ě n >;s6 !  :Nx `[S D HU ~ q›J F} a g*D 49 / pn k h (t 8NxƐF _!r չ7 ZR R׷ q/5") Ӎ NY 0 x sZ!   o  fu  ,  K"$ ? pg  㕣=  1» {h " fh7    y  } € +7  $ y " X —ą - G P u 4 m >J 5 L =V ' ^@I p ?MS xЌ XV P ! h "C NS9B8̢ ]!K  e   zA , ӏkbY  !< XQ ٿyS| *" f { w  4@[S <  # 0 ! js [m  =,~ o "ݎ DHf Wo $ g ! Vԅ t mB /y Wf V4񺍸 c+@x?  B ~u " xUN e 0 BĂ) ~J pz! 7y6]l Ԥ@ P a< O /DHC `≻  N m"$  0ObB }{ x AO FCG D R ^ "B  { WDH  UR l@ T #  +"d T ; 0 i  D}. 7 ` ' ] w rE &S i ƕiTD EL P _ u h $ Ա FG wVD G L R Zf ' .!] J /ZR oGЍs Mr Ĥ ʬ 3 Q [3 cL ` ^ p + ( F;# B 5 '  2Y f [  ϶R0e }  E 7 6M aۮ H <& n % L] E}Up x紉, Uw' Q  Ǯշo k ވۙ 0N94 VX5 xEDE l D #֤ } C o )W :  ^ s 9  bRf iX5u ཱི 4 :[  T 1. | [E 2ؽ Iy\ : o x K G 5 ylP ' uK E ftb/i[3 .g _  [3M n G, #NwQ5~  ؚ) | n =Ц"x qg gB ` 듘 ~ x w ? ? R~  _ u. &VQ K˻   H C ( TN˄+ `C dA nB׭ D 3"Z G ê ^k H_ /- ~ " R_  .8 Z_ 6@ o  xg  uP ? 3լ @7AM!  E7^ - =V L  x  g-D0  CtmW 7  O  G _ WD0 g C  w1 r d w : a | \  *" f nֳ ^ H# f L ` Z ۽hV  }S F r0Ù Bć5r] @! NL iQ]{s^=4 d  WD  "  "   M; t" 8 5 e dL| "-*st" ) SWD ?R[S e ooF  20.D ? bo =) A i o d ģ ZҰaO @E =) i D a &ܟa CϞ y6 ,<%{^x%{f8? `iw^ ?/ M * IEND B`