Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 597355 Details for
Bug 832855
Teporary file is left behind with the sed option '--copy'
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch to fix the issue (changed function names)
el7-sed-copy.patch (text/plain), 2.13 KB, created by
Martin Bříza
on 2012-07-10 14:28:42 UTC
(
hide
)
Description:
Proposed patch to fix the issue (changed function names)
Filename:
MIME Type:
Creator:
Martin Bříza
Created:
2012-07-10 14:28:42 UTC
Size:
2.13 KB
patch
obsolete
>diff --git a/sed-4.2.1-copy.patch b/sed-4.2.1-copy.patch >index 48bde87..673e8d8 100644 >--- a/sed-4.2.1-copy.patch >+++ b/sed-4.2.1-copy.patch >@@ -29,7 +29,7 @@ index af8c4d2..c05b418 100644 > { > char *backup_file_name = get_backup_file_name(target_name); > - ck_rename (target_name, backup_file_name, input->out_file_name); >-+ (copy_instead_of_rename?ck_fcmove:ck_rename) >++ (copy_instead_of_rename?ck_fccopy:ck_rename) > + (target_name, backup_file_name, input->out_file_name); > free (backup_file_name); > } >@@ -135,7 +135,7 @@ index 241ef1d..ebe6030 100644 > > #include "utils.h" > #include "pathmax.h" >-@@ -408,33 +409,99 @@ follow_symlink(const char *fname) >+@@ -408,33 +409,109 @@ follow_symlink(const char *fname) > return fname; > #endif /* ENABLE_FOLLOW_SYMLINKS */ > } >@@ -238,13 +238,23 @@ index 241ef1d..ebe6030 100644 > > +/* Attempt to copy file contents between the files. */ > +void >-+ck_fcmove (from, to, unlink_if_fail) >++ck_fccopy (from, to, unlink_if_fail) > + const char *from, *to; > + const char *unlink_if_fail; > +{ > + if (!_unlink_if_fail (_copy (from, to), unlink_if_fail)) > + panic (_("cannot copy %s to %s: %s"), from, to, strerror (errno)); > +} >++ >++/* Copy contents between files, and then unlink the source. */ >++void >++ck_fcmove (from, to, unlink_if_fail) >++ const char *from, *to; >++ const char *unlink_if_fail; >++{ >++ ck_fccopy (from, to, unlink_if_fail); >++ ck_unlink (from); >++} > > > >@@ -252,10 +262,11 @@ diff --git a/sed/utils.h b/sed/utils.h > index d3f431d..b915596 100644 > --- a/sed/utils.h > +++ b/sed/utils.h >-@@ -32,6 +32,7 @@ const char *follow_symlink P_((const char *path)); >+@@ -32,6 +32,8 @@ const char *follow_symlink P_((const char *path)); > size_t ck_getline P_((char **text, size_t *buflen, FILE *stream)); > FILE * ck_mkstemp P_((char **p_filename, char *tmpdir, char *base)); > void ck_rename P_((const char *from, const char *to, const char *unlink_if_fail)); >++void ck_fccopy P_((const char *from, const char *to, const char *unlink_if_fail)); > +void ck_fcmove P_((const char *from, const char *to, const char *unlink_if_fail)); > > VOID *ck_malloc P_((size_t size));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 832855
:
597071
| 597355