Re: [PATCH] nsenter: new command (light wrapper around setns)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 11, 2013 at 06:45:14PM -0500, Mike Frysinger wrote:
> path should be const
> 
> > +			namespace_target_pid = strtoul(optarg, &end, 10);
> > +			if (!*optarg || (*optarg && *end) || errno != 0) {
> > +				err(EXIT_FAILURE,
> > +				    _("Pid '%s' is not a valid number"),
> > +				    optarg);
> > +			}
> 
> we really should introduce an xstroul() helper

see include/strutils.h

  namespace_target_pid = strtoul_or_err(optarg, _("failed to parse pid"));

    Karel



-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux