Filesys-SmbClientParser
view release on metacpan or search on metacpan
SmbClientParser.pm view on Meta::CPAN
if ($args=~/^([^;]* -c '[^']*'[^;]*)$/) {
$pargs=$1;
} else { # what that ?
die("Why a ';' here ? => $args");
}
} else { die("Why a ';' here ? => $args"); }
my @var = `$pargs`;
my $var=join(' ',@var ) ;
# Quick return if no answer
return 1 if (!$var);
if ($var=~/ERRnoaccess/) {
$er="Cmd $command: permission denied";
} elsif ($var=~/ERRbadfunc/) {
$er="Cmd $command: Invalid function.";
} elsif ($var=~/ERRbadfile/) {
$er="Cmd $command: File not found.";
} elsif ($var=~/ERRbadpath/) {
$er="Cmd $command: Directory invalid.";
} elsif ($var=~/ERRnofids/) {
$er="Cmd $command: No file descriptors available";
} elsif ($var=~/ERRnoaccess/) {
$er="Cmd $command: Access denied.";
} elsif ($var=~/ERRbadfid/) {
$er="Cmd $command: Invalid file handle.";
} elsif ($var=~/ERRbadmcb/) {
$er="Cmd $command: Memory control blocks destroyed.";
} elsif ($var=~/ERRnomem/) {
$er="Cmd $command: Insufficient server memory to perform the requested function.";
} elsif ($var=~/ERRbadmem/) {
$er="Cmd $command: Invalid memory block address.";
} elsif ($var=~/ERRbadenv/) {
$er="Cmd $command: Invalid environment.";
} elsif ($var=~/ERRbadformat/) {
$er="Cmd $command: Invalid format.";
} elsif ($var=~/ERRbadaccess/) {
$er="Cmd $command: Invalid open mode.";
} elsif ($var=~/ERRbaddata/) {
$er="Cmd $command: Invalid data.";
} elsif ($var=~/ERRbaddrive/)
{$er="Cmd $command: Invalid drive specified.";}
elsif ($var=~/ERRremcd/)
{$er="Cmd $command: A Delete Directory request attempted to remove the server's current directory.";}
elsif ($var=~/ERRdiffdevice/)
{$er="Cmd $command: Not same device.";}
elsif ($var=~/ERRnofiles/)
{$er="Cmd $command: A File Search command can find no more files matching the specified criteria.";}
elsif ($var=~/ERRbadshare/)
{$er="Cmd $command: The sharing mode specified for an Open conflicts with existing FIDs on the file.";}
elsif ($var=~/ERRlock/)
{$er="Cmd $command: A Lock request conflicted with an existing lock or specified an invalid mode, or an Unlock requested attempted to remove a lock held by another process.";}
elsif ($var=~/ERRunsup/)
{$er="Cmd $command: The operation is unsupported";}
elsif ($var=~/ERRnosuchshare/)
{$er="Cmd $command: You specified an invalid share name";}
elsif ($var=~/ERRfilexists/)
{$er="Error $command: The file named in a Create Directory, Make New File or Link request already exists.";}
elsif ($var=~/ERRbadpipe/)
{$er="Cmd $command: Pipe invalid.";}
elsif ($var=~/ERRpipebusy/)
{$er="Cmd $command: All instances of the requested pipe are busy.";}
elsif ($var=~/ERRpipeclosing/)
{$er="Cmd $command: Pipe close in progress.";}
elsif ($var=~/ERRnotconnected/)
{$er="Cmd $command: No process on other end of pipe.";}
elsif ($var=~/ERRmoredata/)
{$er="Cmd $command: There is more data to be returned.";}
elsif ($var=~/ERRinvgroup/)
{$er="Cmd $command: Invalid workgroup (try the -W option)";}
elsif ($var=~/ERRerror/)
{$er="Cmd $command: Non-specific error code.";}
elsif ($var=~/ERRbadpw/)
{$er="Cmd $command: Bad password - name/password pair in a Tree Connect or Session Setup are invalid.";}
elsif ($var=~/ERRbadtype/)
{$er="Cmd $command: reserved.";}
elsif ($var=~/ERRaccess/)
{$er="Cmd $command: The requester does not have the necessary access rights within the specified context for the requested function. The context is defined by the TID or the UID.";}
elsif ($var=~/ERRinvnid/)
{$er="Cmd $command: The tree ID (TID) specified in a command was invalid.";}
elsif ($var=~/ERRinvnetname/)
{$er="Cmd $command: Invalid network name in tree connect.";}
elsif ($var=~/ERRinvdevice/)
{$er="Cmd $command: Invalid device - printer request made to non-printer connection or non-printer request made to printer connection.";}
elsif ($var=~/ERRqfull/)
{$er="Cmd $command: Print queue full (files) -- returned by open print file.";}
elsif ($var=~/ERRqtoobig/)
{$er="Cmd $command: Print queue full -- no space.";}
elsif ($var=~/ERRqeof/)
{$er="Cmd $command: EOF on print queue dump.";}
elsif ($var=~/ERRinvpfid/)
{$er="Cmd $command: Invalid print file FID.";}
elsif ($var=~/ERRsmbcmd/)
{$er="Cmd $command: The server did not recognize the command received.";}
elsif ($var=~/ERRsrverror/)
{$er="Cmd $command: The server encountered an internal error, e.g., system file unavailable.";}
elsif ($var=~/ERRfilespecs/)
{$er="Cmd $command: The file handle (FID) and pathname parameters contained an invalid combination of values.";}
elsif ($var=~/ERRreserved/)
{$er="Cmd $command: reserved.";}
elsif ($var=~/ERRbadpermits/)
{$er="Cmd $command: The access permissions specified for a file or directory are not a valid combination. The server cannot set the requested attribute.";}
elsif ($var=~/ERRreserved/)
{$er="Cmd $command: reserved.";}
elsif ($var=~/ERRsetattrmode/)
{$er="Cmd $command: The attribute mode in the Set File Attribute request is invalid.";}
elsif ($var=~/ERRpaused/)
{$er="Cmd $command: Server is paused.";}
elsif ($var=~/ERRmsgoff/)
{$er="Cmd $command: Not receiving messages.";}
elsif ($var=~/ERRnoroom/)
{$er="Cmd $command: No room to buffer message.";}
elsif ($var=~/ERRrmuns/)
{$er="Cmd $command: Too many remote user names.";}
elsif ($var=~/ERRtimeout/)
{$er="Cmd $command: Operation timed out.";}
elsif ($var=~/ERRnoresource/)
{ $er="Cmd $command: No resources currently available for request.";}
elsif ($var=~/ERRtoomanyuids/)
{$er="Cmd $command: Too many UIDs active on this session.";}
elsif ($var=~/ERRbaduid/)
{
( run in 0.997 second using v1.01-cache-2.11-cpan-39bf76dae61 )