Hi Rob,
Thanks Alot, will start on it .
Thanks
Haroon.
From: Rob Landley
Sent: Wednesday, August 22, 2018 5:02 PM
To: haroon maqsood; toybox@lists.landley.net
Subject: Re: [Toybox] [CLEANUP][watch.c]
On 08/22/2018 06:10 AM, haroon maqsood wrote:
> carry
On 08/22/2018 06:10 AM, haroon maqsood wrote:
> carrying on from the point of knowing what is expected, would you be able to
> point me towards a something in the pending directory that you have not
> started
> on , that i can skim through and perhaps try and cleanup, just to avoid
> duplicating
skim through and perhaps try and cleanup, just to avoid
duplicating efforts.
Thanks
Haroon.
From: Rob Landley
Sent: Tuesday, August 21, 2018 3:22 PM
To: haroon maqsood; toybox@lists.landley.net
Subject: Re: [Toybox] [CLEANUP][watch.c]
On 08/20/2018 03:13 AM, haroon
On 08/20/2018 02:43 PM, enh wrote:
> (less importantly, i wondered if the \e escapes in interestingtimes.c are your
> plan for the future and will replace \033, or should be \e for consistency.
> personally, i find \e less unreadable -- i even prefer \x1b to \033 -- but \e
> is
> not actually in
On 08/20/2018 02:39 PM, enh wrote:
> speaking of terminal_size, is there a reason it doesn't call
> terminal_probesize
> if the ioctl fails? it seems like terminal_probesize is only used in top, in
> response to a signal (presumably for SIGWINCH). whereas terminal_size is used
> in
> all kinds
On 08/20/2018 03:13 AM, haroon maqsood wrote:
> Hi Rob,
> Thanks a lot for the feedback,
> Noted, i will be more careful next time .
It's a hard problem to get right. (Well, by my standards anyway.)
If you do "watch -n 2 sleep 5" on debian you get no output for 5 seconds, and
then it updates
(less importantly, i wondered if the \e escapes in interestingtimes.c are
your plan for the future and will replace \033, or should be \e for
consistency. personally, i find \e less unreadable -- i even prefer \x1b to
\033 -- but \e is not actually in the standard.)
On Mon, Aug 20, 2018 at 12:39
On Sun, Aug 19, 2018 at 2:44 PM Rob Landley wrote:
> On 08/16/2018 08:37 PM, haroon maqsood wrote:
> > Hi PFA,
> > my attempt at cleanup of watch.c in pending.
> > Thanks
> > Haroon
>
> A little more description of what you did would be nice. Let's see...
> requiring
> -n to be at least one
Hi Rob,
Thanks a lot for the feedback,
Noted, i will be more careful next time .
Haroon
From: Rob Landley
Sent: Sunday, August 19, 2018 9:44 PM
To: haroon maqsood; toybox@lists.landley.net
Subject: Re: [Toybox] [CLEANUP][watch.c]
On 08/16/2018 08:37 PM, haroon
On 08/16/2018 08:37 PM, haroon maqsood wrote:
> Hi PFA,
> my attempt at cleanup of watch.c in pending.
> Thanks
> Haroon
A little more description of what you did would be nice. Let's see... requiring
-n to be at least one second makes sense, although debian's can do "-n 0.1".
(That gets into the
Hi PFA,
my attempt at cleanup of watch.c in pending.
Thanks
Haroon
From cf2626c0cc19cf0bcc831c289c6fb85ffd54382b Mon Sep 17 00:00:00 2001
From: "maqsood3...@live.com"
Date: Fri, 17 Aug 2018 02:25:37 +0100
Subject: [PATCH] watch cleanup
---
toys/pending/watch.c | 77
I lost a couple days to a bad cold. I've got the release notes written
up but I don't want to leave dmesg demoted for another release.
Did I make it clear how deeply horrible this new API is? We're talking
_craptacular_:
http://landley.net/notes-2017.html#06-02-2017
Ok, command: first we
Hi, Rob.
I cleaned up the code in 'netstat.c' as belows.
- Adjust to 80 columns
- remove a useless function(strchr_nul), variable, type casting and
compile warnings(fgets)
- clean up netstat command option condition
- change useless double pointer to single point and dynamic memory
i'm pretty sure a lot of the reformatting here doesn't match rob's
intended style. it would be nice to have a .clang-format checked in
that's close enough to rob's intended style that we can just automate
this to be "good enough" and forget about it...
On Thu, Jan 21, 2016 at 2:04 AM, Lipi C. H.
On Thu, Jan 21, 2016 at 4:04 AM, Lipi C. H. Lee wrote:
> Hi, Rob.
>
> I cleaned up the code in 'netstat.c' as belows.
>
> - Adjust to 80 columns
> - remove a useless function(strchr_nul), variable, type casting and compile
> warnings(fgets)
> - clean up netstat command
I've been needing to do a proper cleanup pass on login forever, and
finally got around to it.
toys/other/login.c | 246 ---
1 file changed, 94 insertions(+), 152 deletions(-)
My notes, if you're curious:
principle: fewer lines means you can see more
On 07/29/14 17:15, Bradley Conroy wrote:
/* mix.c - A very basic mixer.
*
* Copyright 2014 Brad Conroy, dedicated to the Public Domain.
*
I redid mix.c because it segfaulted when I tried it. It still doesn't _work_
for me, but neither does aumix or the xfce volume control knob on this
On Sat, Dec 27, 2014 at 02:56:46PM -0600, Rob Landley wrote:
On 07/29/14 17:15, Bradley Conroy wrote:
/* mix.c - A very basic mixer.
*
* Copyright 2014 Brad Conroy, dedicated to the Public Domain.
*
I redid mix.c because it segfaulted when I tried it. It still doesn't _work_
for
On 12/27/14 16:20, Isaac Dunham wrote:
On Sat, Dec 27, 2014 at 02:56:46PM -0600, Rob Landley wrote:
On 07/29/14 17:15, Bradley Conroy wrote:
/* mix.c - A very basic mixer.
*
* Copyright 2014 Brad Conroy, dedicated to the Public Domain.
*
I redid mix.c because it segfaulted when I tried
On Mon, Jul 7, 2014 at 10:25 AM, Rob Landley r...@landley.net wrote:
Haven't checked this in yet because it needs more testing, but patch is
attached:
GROUP is always toys.optargs[toys.optc-1] so let's move the getgrnam()
before the two if/else cases so it's not duplicated. (Speaking of
Haven't checked this in yet because it needs more testing, but patch is
attached:
GROUP is always toys.optargs[toys.optc-1] so let's move the getgrnam()
before the two if/else cases so it's not duplicated. (Speaking of which,
in the original code getgrnam() with the corresponding error message
In the absence of a response to wednesday's request for makedevs tests,
I just used:
#name type mode uid gid major minor start increment count
#bcdfp
/blah d 755 0 500
/blah/block b 600 0 0
/blah/char c 666 500 500 1 5 3 2 4
/blah/pipe p 777 500 0
Under aboriginal linux, and fixed up the bugs I
I couldn't find a writeup of 921 and I'm trying to fill out the cleanup.html
page, so:
Commit 921:
http://landley.net/hg/toybox/rev/921
This pass is does a couple things:
1) make sockfd a global so we don't keep reopening the socket
2) inline stuff for future cleanups.
The inlines are
On Thu, Jun 26, 2014 at 07:18:31AM -0500, Rob Landley wrote:
On 06/26/14 00:20, Isaac Dunham wrote:
On Wed, Jun 25, 2014 at 11:02:03PM -0500, Rob Landley wrote:
We don't need -m help when we can put the list of supported types in
the help text itself. (Unless this is used programmatically
Commit 1362: http://landley.net/hg/toybox/rev/1362
First question: Are there any test command lines I can use for this?
The 64 byte limitation on name is arbitrary, it's the start of the
string so we might as well just null terminate and use that memory.
The help text says to feed '-' to
Commit 1363: http://landley.net/hg/toybox/rev/1363
Ok, starting with toys/pending/mkpasswd.c:
The is_salt_valid() function is only called from one place, and using a
regex to check isalnum() or two punctuation characters is a bit
overkill. (Since we did not use TOYFLAG_LOCALE we're in the C
On Wed, Jun 25, 2014 at 11:02:03PM -0500, Rob Landley wrote:
We don't need -m help when we can put the list of supported types in
the help text itself. (Unless this is used programmatically to
autodetect support? The ubuntu version outputs a lot of extra verbiage
that would make parsing hard,
Just a couple comments; also, thanks for the explanation!
On Sun, May 18, 2014 at 07:58:49PM -0500, Rob Landley wrote:
http://landley.net/hg/toybox/rev/1289
Headers info:
As long as we've got a config LSPCI_TEXT, have the -n option live there.
Add a USE() guard in the NEWTOY() line, and
I keep writing up little notes to self and then forgetting to post 'em.
This was from my first pass over last. (Not a huge amount of cleanup,
most of it was research.)
Currently, toys.h includes utmpx.h but not utmp.h. The reason is that
utmpx.h is in posix-2008, and utmp.h isn't:
This dd cleanup has turned into a rewrite and port over sort of thing,
so it's not quite the same incremental series of patches as a lot of
previous cleanups.
I got summary() in (using the new clock_gettime() stuff since the
milisecond time querying is apparently deprecated now), and hooked up
On 04/12/14 16:25, Isaac Dunham wrote:
getty: build fix, clean up messages, simplify code
build fix: xmsprintf has been renamed
shorten and lowercase the error messages
use xexec() instead of execlp(); perror_exit();
remove redundant variable setting
Applied.
--
And the rationale:
openvt tries opening several devices to get an fd that points to the
current console, without a need for read or write permissions.
O_RDWR implies that both O_RDONLY and O_WRONLY would work, so skip it.
Reindent.
--
I also have a large patch queue for the getty version Ashwini Sharma
submitted.
http://landley.net/hg/toybox/rev/835
Two changes to the NEWTOY() line: only allow at most 1 leftover
non-option argument instead of 2 (because POSIX says so), and use
TOYFLAG_UMASK to tell the setup code in main.c to set the umask to 0
before calling uudecode's main function. (That way we
http://landley.net/hg/toybox/rev/838
Yank the const annotations.
uudecode_b64_1byte:
The old function had a giant (static) table, the new one is a set of 5
if statements covering the same range. This includes removing a number
of comments, because the if statements are reasonably
Filling out the cleanup.html page, there are some commits I didn't post
message explaining. So I'm backfilling a bit as I fill in the web page.
Commit http://landley.net/hg/toybox/rev/862
The usual whitespace collation and inlining. Remove more unused headers.
Remove function setport() which
Commit http://landley.net/hg/toybox/rev/864
Move the next pointer of struct _iface_list to the start of the struct
so we can use the llist infrastructure. Collate iface_flags_str[] to
take up fewer lines.
Remove set_data() from the prototype list because we're going to inline
it everywhere
On 11/24/2013 08:17:24 PM, ibid...@gmail.com wrote:
I ran into build errors with tftpd and dumpleases, so here's a fix:
POLL_IN is a POSIX macro in signal.h, so we need to use another label.
Which libc hit that?
toynet.h was deleted before dumpleases was merged.
While I was at it, I thought
I had broken resolve_config() and the daemonizing (didn't notice the
latter because I've always run it in the foreground.)...
syslogd doesn't seem very standardized between linux, the BSDs and MAC.
Let me consider the options to specify which sockets to listen to:
toybox:
syslogd -p defsock -a
On 08/24/2013 05:20:06 AM, Felix Janda wrote:
Should have tested the previous two patches more than that they
compile.
The changes
-facstr = dec(LOG_FAC(pri), facilitynames);
+facstr = dec(pri LOG_FACMASK, facilitynames);
-for (tk = !=*; tk; tk++, bits = 1) {
+for (tk =
Rob Landley wrote:
On 08/24/2013 05:20:06 AM, Felix Janda wrote:
[...]
If none of these have been applied yet, I could prepare new patches
which don't leave the toy broken in between them.
I like the incremental nature of it, but I'm still not sure why patch 4
_doesn't_ seem to break
# HG changeset patch
# User Felix Janda felix.ja...@posteo.de
# Date 1377033348 -7200
# Node ID c8e6b5f10c57bcca7859b4c2891dfdf346ecac6d
# Parent f9271a80fedc23b91559f0527da8e9c22d152b5d
syslogd: cleanup
- Remove structure fd_pair so that sigfd can go into GLOBALS
- Remove struct typedefs
-
Long overdue, cleaning up du.c (which predates the pending directory).
http://landley.net/hg/toybox/rev/1010 (and
http://127.0.0.1/hg/toybox/rev/1011).
Added [-HL] and such to the end of the option string so last option of
a given type wins, and fiddled with the help text.
The usual
On 08/10/2013 01:28:23 PM, Felix Janda wrote:
Hello,
below a patch doing the inlining as suggested by Isaac and
another patch which moves the common functionality for
daemonizing in klogd and syslogd to lib/pending.c.
Cheers,
Felix
Both applied.
Rob
On 07/27/2013 02:30:25 AM, Felix Janda wrote:
Ah, I hadn't realized that this is the reason for the short commmit
messages for the cleanups.
Since the patch isn't (or doesn't seem to be) applied yet. Below
there is
an edited patch with some more useful commit message.
Felix
I'd applied it
Various fixes to logger in below patch.
Mainly inline parse_priority(). Many other small changes e.g. s/const//,
move around some variables, ...
-Felix
# HG changeset patch
# User Felix Janda felix.ja...@posteo.de
# Date 1374706109 -7200
# Node ID 8cc26924c2ef2e862c975a31167a685e18f555ec
#
http://landley.net/hg/toybox/rev/957
It's been a while. I got a bit blocked on get_sockaddr() cleanup,
because although it's only ever called twice (once for ipv6 and once
for ipv4), I don't understand what the addresses it's parsing should
look like. For example, does local: apply to just
Description of the paste cleanup that accidentally got checked in
during commit 944 because hg import -f has side effects.
http://landley.net/hg/toybox/rev/944
(Yes, that commit description is actively ironic. Scroll down to
patch.c.)
Minor tweaks to the first loop: if -d isn't set then
Rob Landley wrote:
Description of the paste cleanup that accidentally got checked in
during commit 944 because hg import -f has side effects.
http://landley.net/hg/toybox/rev/944
(Yes, that commit description is actively ironic. Scroll down to
patch.c.)
[...]
The accidental
I put description text into commits 912, 914, 916, and 917, all
building on Felix's work. And then the actual mv was its own commit
(918) in hopes of confusing source control less. (Although I did switch
default n to default y in the same commit so the file wasn't
_identical_...)
http://landley.net/hg/toybox/rev/906
I started by doing the table cleanup I mentioned last message, bringing
the table back down to three members. I took out the array and made all
three members separate, called name, on, and off, and just had
the flag setting logic doing two ? : swaps to
http://landley.net/hg/toybox/rev/907
--- show_ip_addr
The function show_ip_addr() is only ever called from display_ifconfig.
It's called four times in a row, so it's better to have it be a
function that repeated inline four times. However, it's even better to
have it be the body of a loop
Cleaning up ifconfig, commit 905:
http://landley.net/hg/toybox/rev/905
get_strtou() isn't actually needed: it's a wrapper for strtoul() that's
only ever called once. It sets most of its effort setting errno, but
all you need to know is that the endptr from strtou isn't the end of
the
On 04/22/2013 04:27:56 PM, Felix Janda wrote:
On 04/21/13 at 11:30pm, Rob Landley wrote:
Should %T be implemented?
I'd wait for somebody to complain about its absence.
I like that approach. Attached is another patch removing unimplemented
options/formats and doing a bit of cleanup (mainly
On 04/21/13 at 12:09am, Rob Landley wrote:
On 04/19/2013 05:28:27 PM, Felix Janda wrote:
[snip]
The functionality of get_access_str() is also implemented in the ls
toy
(likely much better). Should something like it be in the library?
Once code can be shared by a second command,
On 04/21/2013 04:40:16 PM, Felix Janda wrote:
If you can come up with a clean way to share the code, go for it.
Ok, actually I'd only put something like get_access_str() of stat into
the lib.
Cool. Although a quick glance at the one in stat implies it doesn't
handle the fun combinations of
On 04/16/2013 10:18:59 AM, Kyungwan Han wrote:
Hello,
I learn programming skill and knowledge from following up code
cleaning,
so I'm checking the change set:
http://www.landley.net/hg/toybox/rev/6be04ec7b7ac
Ah, I never did summarize that one, did I? Sorry, my day job at Cray's
been
The rest of the uuencode cleanup was a big opportunity to inline stuff,
put common code next to each other, and then eliminate duplication.
Alas, if you edit a file and move it in the same commit, mercurial
loses track of it. We can beat the patch out of it via:
diff -u (hg cat -r 830
57 matches
Mail list logo