Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 216838 - Patch to add null terminated output to slocate
Summary: Patch to add null terminated output to slocate
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-08 08:51 UTC by marty rosenberg
Modified: 2008-08-19 00:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for null terminated output (slocate-3.1-null.patch,2.29 KB, text/plain)
2008-04-08 08:52 UTC, marty rosenberg
Details
patch that actually works (slocate-3.1-null.patch,122.05 KB, text/plain)
2008-04-08 09:24 UTC, marty rosenberg
Details
cruft removed patch (slocate-3.1-null.patch,2.28 KB, patch)
2008-04-09 21:38 UTC, marty rosenberg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description marty rosenberg 2008-04-08 08:51:00 UTC
this patch adds the -0 flag to slocate that will force slocate's output to be
null terminated rather than newline terminated in a manner similar to find -print0, and compatible with xargs -0.

Reproducible: Always

Steps to Reproduce:
slocate doesn't have this option by default.
Comment 1 marty rosenberg 2008-04-08 08:52:09 UTC
Created attachment 149086 [details]
patch for null terminated output
Comment 2 marty rosenberg 2008-04-08 09:24:26 UTC
Created attachment 149089 [details]
patch that actually works

printf("%s\0", foo); doesn't do what you want it to do.  Also made the --help output fit into an 80 character terminal
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2008-04-09 18:38:19 UTC
Your latest patch has some extra cruft in it that makes it tough to read. Remove all your files ending in ~ and redo it. Thanks.
Comment 4 marty rosenberg 2008-04-09 21:38:04 UTC
Created attachment 149243 [details, diff]
cruft removed patch
Comment 5 SpanKY gentoo-dev 2008-04-10 03:52:31 UTC
that still has whitespace noise, but it's easier to fix now

did you send this upstream ?  patch looks fine (havent tested it myself)
Comment 6 marty rosenberg 2008-04-10 06:20:19 UTC
(In reply to comment #5)
> that still has whitespace noise, but it's easier to fix now
> 
> did you send this upstream ?  patch looks fine (havent tested it myself)
> 

Sent it upstream when I made the patch(and when I fixed it).  Haven't heard back from them yet.
Comment 7 SpanKY gentoo-dev 2008-08-19 00:55:51 UTC
thanks, added to slocate-3.1-r2

http://sources.gentoo.org/sys-apps/slocate/files/slocate-3.1-NUL.patch?rev=1.1