From: Martijn Lievaart <netfilter-devel@rtij.nl>
To: Netfilter Developers List <netfilter-devel@lists.netfilter.org>
Subject: [PATCH] Pom-ng: test return code from File::Copy
Date: Wed, 05 May 2004 21:34:08 +0200 [thread overview]
Message-ID: <409941B0.5040100@rtij.nl> (raw)
[-- Attachment #1: Type: text/plain, Size: 178 bytes --]
Hi,
Trying to work out how POM-ng works, I found a slight bug. The
returncode from the File::Copy routine is not tested. Attached patch
fixes that.
Cheers,
Martijn Lievaart
[-- Attachment #2: file_copy_patch --]
[-- Type: text/plain, Size: 490 bytes --]
--- patch-o-matic-ng/Netfilter_POM.pm 2004-05-05 12:24:04.000000000 +0200
+++ patch-o-matic-ng.new/Netfilter_POM.pm 2004-05-05 18:49:26.000000000 +0200
@@ -682,7 +683,10 @@
return 0;
}
}
- File::Copy::copy($srcfile, $destfile);
+ if (!File::Copy::copy($srcfile, $destfile)) {
+ $self->{ERRMSG} .= "unable to copy $srcfile to $destfile: $!\n";
+ return 0;
+ }
# .foo-test is executable
chmod((stat($srcfile))[2] & 07777, $destfile);
} else {
next reply other threads:[~2004-05-05 19:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-05 19:34 Martijn Lievaart [this message]
2004-05-06 14:32 ` [PATCH] Pom-ng: test return code from File::Copy Jozsef Kadlecsik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=409941B0.5040100@rtij.nl \
--to=netfilter-devel@rtij.nl \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.