Commit Graph

8502 Commits

Author SHA1 Message Date
xtraeme
f2803256d9 New configuration file format for the envsys framework:
foo0 {
	#
	# CPU Temperature
	#
	sensor0 {
		critical-max = 70C;
		critical-min = 20C;
	}
	...
}
...

Removed the -m flag that was previously used to set properties for
sensors. Now the -c flag will process all properties specified in
the file (accepted as argument).

To remove all properties that were set, the new -S flag can be used.
This will restore default values for all devices.
2007-10-07 04:16:47 +00:00
xtraeme
cfba73e2fb Remove an extra prop_object_release(). 2007-10-06 22:12:04 +00:00
christos
9f1fcc0d86 portability fixes from joerg. 2007-10-06 20:19:52 +00:00
pavel
eb9220515b Add a check for obsolete sendmail in /etc/mailer.conf, installs a
fresh copy of the file if invoked as "fix". Not enabled by default.
2007-10-05 10:28:45 +00:00
pavel
6590c89893 Return exit status 1 for failed chacks/fixes, 2 for errors. Suggested
by hubertf. Use exit status 3 for internal errors (misuse of internal
functions).
2007-10-05 10:17:13 +00:00
pavel
e9045950d7 do not use trap 0, it clobbers the exit status. Instead remove the
scratch directory in err(). Use err() instead of exit in one place to
ensure that the temporary directory is removed.
2007-10-05 10:06:49 +00:00
christos
03687f1fb0 remove null test; it is not necessary as we always look at the next element.
from Anon Ymous
2007-10-03 19:07:43 +00:00
christos
0bfe3e6189 - int -> size_t
- off by one in \n printing [Anon Ymous]
- return when the end of the array is reached.
2007-10-03 17:45:47 +00:00
kiyohara
c9c6f7ff7e Support type bcsp. 2007-09-30 04:11:02 +00:00
xtraeme
6d61a6b51b Duh! add missing free(3) in previous. 2007-09-27 18:11:05 +00:00
xtraeme
6c73c21f44 In debug mode, don't forget to free the buffer returned by
prop_dictionary_externalize().
2007-09-27 18:08:32 +00:00
xtraeme
ccaf6fc177 - Simplify find_sensors().
- Remove a block that is not used anymore in check_sensors().
2007-09-25 15:09:32 +00:00
xtraeme
9df195ed98 Merge a patch from Iain Hibbert (plunky@):
- some unclear language cleaned up
- inconsistent usage of 'device' and 'driver' to refer to the same thing
- difficult error handling

And print the device name if -d flag is not specified for any driver
registered, e.g:

$ envstat
[aiboost0]
  CPU Temperature:     36.000 degC  max:   70.000 degC  min:   15.000 degC
   MB Temperature:     38.000 degC  max:   50.000 degC  min:   15.000 degC
    Vcore Voltage:      1.232 V     max:    1.350 V     min:    1.150 V
     +3.3 Voltage:      3.264 V     max:    3.500 V     min:    3.000 V
       +5 Voltage:      5.017 V     max:    5.600 V     min:    4.500 V
      +12 Voltage:     11.932 V     max:   13.500 V     min:   11.200 V
    CPU FAN Speed:       1268 RPM
$
2007-09-25 14:20:48 +00:00
plunky
3b0395d28d replace inadvertently removed N 2007-09-20 19:48:26 +00:00
plunky
c231a9012a sort options 2007-09-20 18:38:49 +00:00
xtraeme
3f2361dc7d Mention aps(4). 2007-09-11 21:47:37 +00:00
ginsbach
1f1c7f87ed - remove extraneous \n in err(3) message
- minor KNF whitespace nit
2007-09-11 15:46:56 +00:00
xtraeme
e4ac7a291b Another typo in a comment. 2007-09-10 17:41:26 +00:00
xtraeme
6f1f4d144f Fix a comment. 2007-09-10 17:40:44 +00:00
xtraeme
5316ee99b1 Check argc before calling open(2), and use the out label in another
error case.
2007-09-10 17:39:14 +00:00
xtraeme
fc321f6650 Fix a lint(1) warning and remove oldsize in print_sensors(), it's
not used.
2007-09-10 14:25:17 +00:00
xtraeme
25be892bac Don't forget to check if -s was specified without -d, and add a macro
to check it in two places.
2007-09-10 14:15:11 +00:00
xtraeme
16f28d90fc Redo how the arguments are processed, so that arguments not allowed
will call usage(). Also remove an extra free().
2007-09-10 13:58:50 +00:00
pooka
38602220e1 Free longname in all error branches. CID: 4545 2007-09-08 22:05:32 +00:00
pooka
96b66ea698 Free pufbuf in error branches. CID: 4546 2007-09-08 15:49:33 +00:00
pooka
584065ec56 Check against errors when reading trace device. CID 4561. 2007-09-08 15:34:23 +00:00
plunky
0d2b4f91b7 add new option 'rssi' to enable/disable inquiry results with RSSI, and
add recognition of the "inquiry result with RSSI" packets
2007-09-07 18:40:01 +00:00
pooka
08386a8ca4 adapt to new cmpfb signature 2007-09-06 16:09:09 +00:00
jnemeth
d9fff48060 PR/36931 - Wouter Schoot -- typo 2007-09-06 09:26:21 +00:00
xtraeme
5779f29ae2 Mention that I added support to handle envsys(4) events. 2007-09-05 12:45:51 +00:00
xtraeme
019fd89d16 Improve grammar. 2007-09-05 12:35:08 +00:00
xtraeme
6263ca5fa3 Update to match current kernel code. 2007-09-04 16:54:37 +00:00
xtraeme
85f08bb0ab Fix typo in previous. 2007-09-02 21:31:24 +00:00
xtraeme
13af8b9adc Add the -I flag that skips sensors with invalid state. They are shown
by default, but this is for users that don't want to print them.
2007-09-02 21:25:24 +00:00
xtraeme
1b3709ecde Add a new sensor type to sysmon_envsys(9): ENVSYS_GSTRING.
ENVSYS_GSTRING (aka Generic String) uses the genstr member in
the envsys_data_t struct to add a generic string that envstat(8)
will show as value or state.

It's like the ENVSYS_DRIVER, but doesn't use value_cur. Below
is the dictionary created on these sensors:

<dict>
	<key>description</key>
	<string>acpibat0 charge state</string>
	<key>generic-state-string</key>
	<string>NORMAL</string>
	<key>monitoring-supported</key>
	<false/>
	<key>state</key>
	<string>valid</string>
	<key>type</key>
	<string>Generic string</string>
</dict>

Note that it's limited to 32 chars, but we can grow it if needed.

envstat(8) will print ENVSYS_GSTRING sensors as:

$ envstat -dacpibat0 -s"acpibat0 charge state"
  acpibat0 charge state:     NORMAL
$
2007-09-02 19:36:59 +00:00
tron
07347616e8 Use "ipv6-icmp" instead of "icmp6" to allow loading these rules again.
Patch supplied by Daniel Horecki in PR bin/36874.
2007-09-02 15:28:43 +00:00
pooka
9336b1ca30 Adapt to new puffs_framev_init() signature - gotfb. 2007-09-01 16:43:10 +00:00
jnemeth
fb9f0ce447 PR/36867 - Zafer Aydogan -- trsp is no longertrpt.8 2007-08-30 18:53:54 +00:00
xtraeme
769bd9886e In temperature sensors, do not convert to degC or degF if there's
no value returned.
2007-08-29 16:55:17 +00:00
dogcow
566517a891 add a flag, -p, that only prints public (i.e. non-encrypted) nodes. 2007-08-29 02:27:55 +00:00
dsl
b504fee486 Depracate ND_DEBUG and BIND_DEBUG in favour of RPCBIND_DEBUG.
Add commented out entries for RPCBIND_DEBUG and SVC_RUN_DEBUG in Makefile.
2007-08-27 19:53:32 +00:00
dsl
3d3a92a528 This code has been broken for ~ 20 years!
Initialise the 'fromlen' parameter for recvfrom() prior to the call, instead
of passing in a 'random' value off the stack.
This should fix the problems with ypbind on current.
I suspect the old kernel was not objecting to -ve buffer lengths.
2007-08-27 19:51:50 +00:00
xtraeme
51e9d204ec Check if the dictionary is empty and print a message if it's true. 2007-08-26 10:20:33 +00:00
pooka
485aeac15e error branch management. CID 4503 2007-08-25 09:22:39 +00:00
pooka
c64b357f71 jump to correct error branch. CID 4500 2007-08-25 09:01:08 +00:00
pooka
73d7189c08 If a node is forcibly reclaimed, close can be called more times
than open (or less, for the particular fs).  So don't be uptight
about opencount.
2007-08-24 13:33:51 +00:00
pooka
9b93e5ea2c Prevent crash in case there is more than one reader for the same
directory concurrently.  Might need to revisit the method used here
later, though.
2007-08-23 15:19:40 +00:00
christos
1a9cb96f06 PR/36820: Geoff C. Wing: ypserv maplist functionality broken due to off-by-one
error
2007-08-22 16:49:17 +00:00
perry
e34be9798b Never use "utilize". It means exactly the same thing as "use", but it
is longer and more cumbersome. It can always be replaced with "use"
without any change in meaning.
2007-08-20 16:07:05 +00:00
pavel
5e809e89c6 Attempt at fixing build failures after proplib was converted to bool:
FALSE -> false, TRUE -> true, boolean_t -> bool, int -> bool when
appropriate, include stdbool.h . proplib.h no longer provides boolean_t,
so it is necessary to change to bool.

From Tom Spindler (dogcow@).
2007-08-17 17:59:15 +00:00
pooka
25a346d4fb Nuke PUFFSLOOKUP_FOO and move to NAMEI_FOO 2007-08-15 14:19:19 +00:00
joerg
7fb995bb6e Catch up with pkg_install-20070814. 2007-08-14 23:01:05 +00:00
pooka
62234858c3 * use more sensible perms
* use mounter uid/gid as file owners
* sprinkle static
2007-08-10 08:13:11 +00:00
pooka
f49fa2014c add mount_sysctlfs.8 2007-08-10 07:59:32 +00:00
pooka
e0876492cd __RCSID police 2007-08-09 22:03:20 +00:00
pooka
ef86ff763c add sysctlfs 2007-08-09 22:03:01 +00:00
pooka
ba4e596bc9 move sysctlfs from examples to base 2007-08-09 22:01:25 +00:00
joerg
1c0eed0117 Fix typo. 2007-08-09 18:50:58 +00:00
joerg
ca08f11a4d Regen config.h. 2007-08-08 22:44:49 +00:00
seb
2d1475af34 Fix typo.
Ok'ed by xtraeme@
2007-08-07 10:17:17 +00:00
xtraeme
8d2fbe8ac8 The caller of prop_dictionary_externalize is responsible to free the
returned buffer... make it so. Reminded by prop_dictionary(3).
2007-08-05 23:20:44 +00:00
jmmv
f5d7807725 Add the __COPYRIGHT and __RCSID tags. 2007-08-05 13:52:44 +00:00
dsieger
8438931b2b From Zafer Aydogan: Fix a typo: s/distination/destination/ 2007-08-05 09:31:24 +00:00
ad
18af8ee9bd Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.
2007-08-04 11:02:56 +00:00
wiz
96a93618fa It is probably better to use build.c in SRCS instead of build.o. 2007-08-03 21:50:27 +00:00
jmmv
2fe103e7dd Messages passed to errx are not supposed to have a trailing \n. Fix that. 2007-08-03 15:34:00 +00:00
joerg
9f6fe41470 Update reach-over code for pkg_install-20070802. 2007-08-03 14:04:15 +00:00
pooka
b5bd455564 make closehandles() void, because that's what it is 2007-07-29 17:50:22 +00:00
nonaka
16469ee06f Added zaurus. 2007-07-29 14:37:25 +00:00
nonaka
055f45996f Added zaurus. 2007-07-29 14:34:45 +00:00
plunky
30ba4a7458 add mention of rc.d/btuartd 2007-07-29 13:17:38 +00:00
pooka
1aba0dbed1 Track memory mappings. Close file handles already in close() if there
are no active mappings, otherwise do the standard inactive() run.
2007-07-27 09:46:27 +00:00
drochner
baf5b50880 adjust for tcpdump-3.9.7 2007-07-24 12:01:00 +00:00
xtraeme
9293272695 Erm... fix previous. 2007-07-21 11:11:10 +00:00
xtraeme
6d38d74b11 Fix a logic bug: report a message and error if -s or -m is being used
without -d.
2007-07-21 10:59:57 +00:00
christos
ce7376f2ed more cygwin fixes. 2007-07-20 18:58:14 +00:00
christos
52c8d9f862 cygwin support. 2007-07-20 16:39:05 +00:00
pooka
242bfad7a6 support poll 2007-07-20 13:18:09 +00:00
pooka
87429c840c Oops, the cookies for nfs of course represent the *next* directory
entry offset, not the current one.
2007-07-19 10:14:53 +00:00
pooka
d8a510556e get rid of DBG= 2007-07-18 22:38:58 +00:00
christos
63bf90c624 Eliminate MFSNAMELEN 2007-07-17 22:00:46 +00:00
christos
9e211aafa1 Kill MFSNAMELEN 2007-07-17 21:50:07 +00:00
xtraeme
37fa16db65 Return the value returned by prop_dictionary_recv_ioctl() if the -x flag
is specified too.
2007-07-17 18:15:02 +00:00
xtraeme
8b1500977e - Return the value returned by prop_dictionary_{recv,send}_ioctl
in all cases.
- Skip sensors that do not have a description object in its dictionary.
2007-07-17 17:40:59 +00:00
xtraeme
0a6f85e0f3 Only allow to use ENVSYS_SETDICTIONARY if the user has write permission
in the /dev/sysmon device.

Use O_RDONLY for ENVSYS_GETDICTIONARY and O_RDWR for ENVSYS_SETDICTIONARY
in envstat(8).

Fixes PR kern/36661 by YAMAMOTO Takashi.
2007-07-17 15:43:08 +00:00
xtraeme
2577f77bbc Add the -r flag, which is a dummy flag... only added for compatibility
reasons.
2007-07-17 13:12:46 +00:00
pooka
08db7d7534 * add mntfromname parameter to puffs_init()
* set it in file servers
2007-07-17 11:34:51 +00:00
pooka
90ba17c197 support standard user@host:path mount argument 2007-07-17 10:06:03 +00:00
joerg
2ccbc1ff9d Switch to src/dist as primary src location of pkg_install.
Adjust the Makefiles to be reachover Makefiles and remove
some unnecessary warning exceptions.

audit-packages.conf is stored redundantly in src/etc, not changed yet.
pkgsrc.7 is also kept in share/man/man7.

Add a comment in lib/nbcompat.h to make the file non-empty.
2007-07-16 19:57:46 +00:00
joerg
f6afac53fa Switch to src/dist as primary src location of pkg_install.
Adjust the Makefiles to be reachover Makefiles and remove
some unnecessary warning exceptions.

audit-packages.conf is stored redundantly in src/etc, not changed yet.
pkgsrc.7 is also kept in share/man/man7.

Add a comment in lib/nbcompat.h to make the file non-empty.
2007-07-16 19:33:02 +00:00
xtraeme
d99380c510 Explain that sensor_indicator will be used for indicators and integers. 2007-07-16 17:49:56 +00:00
pooka
9ec31d4b95 If the target node exists in rename, do not try to issue a setback
to signal no references, as that is not currently supported for
node_rename().  The removed node will not immediately be reclaimed,
but we can live with that for now.

While here, factor the removal code a bit to share with remove and
rmdir.

fixes PR kern/36637 by reinoud
2007-07-16 09:36:06 +00:00
wiz
833f95f3dc Sort options. Sync -E argument name with man page. 2007-07-15 21:24:46 +00:00
wiz
e85760e80f Sort options. Use HTML escapes. 2007-07-15 21:24:22 +00:00
xtraeme
efff6f1100 Extend do_envsys() and check if the sensor_* files in /etc/powerd/scripts
are installed.
2007-07-15 14:31:08 +00:00
xtraeme
307b2a722c Do not install fixsb anymore, which was removed recently. 2007-07-15 13:02:41 +00:00
jnemeth
e135b05bdf fix error message for obsolete_libs 2007-07-15 03:04:39 +00:00
joerg
3a6411a4c8 When fixing vsftpd, other FTP server were broken as they return
different error codes for unmatching glob patterns. Basically ignore the
error code and just try the other pattern. chdir errors are still
considered fatal.

Bump version to 20070715.
2007-07-14 22:53:27 +00:00
ad
96d0aa8e9b fixsb has done its job. 2007-07-14 21:20:31 +00:00
adrianp
38581a0561 Update to pkg_install-20070714
Merge of audit-packages with various improvements:
* Version 20070714
	Initial release of re-write in C
	Add support for notfication of eol packages (-e)
	Multiple levels of verbosity (e.g. -v -v)
	Specify a custom config file to use (-c)
	Query running config values (-Q)
	Default to download .gz compress pkg-vulnerabilities file
	Support for .bz2 compress pkg-vulnerabilities file
	Verify signature on downloaded files (-s)

Thanks to tron@, jschauma@, agc@, joerg@ and pkgsrc-security@ for feedback
and testing.
2007-07-14 20:03:41 +00:00
dsl
29f2310244 Add the new 'data_len' parameter to mount calls.
Passing in zero causes the kernel to use the default for the filesystem,
doing anything else here would require hacking through layers of code
in 'dist'.
2007-07-14 16:00:07 +00:00
ad
5c2240bb95 - Increase default number of trace buffers to 10000.
- New options:
     -f         Trace only by calling functions.
     -m         Merge call sites within unique functions.
     -M         Merge lock addresses within unique objects.
2007-07-14 13:30:43 +00:00
xtraeme
45e944a6cf Define a set of macros to avoid writting same code many times. 2007-07-13 00:42:57 +00:00
xtraeme
425df11cce Add a missing printf in parse_dictionary() and simplify this part to
avoid code duplication in two places.
2007-07-12 22:52:54 +00:00
xtraeme
0938d9b438 Remove a comment that is not valid anymore. 2007-07-12 18:34:07 +00:00
xtraeme
ff9bb2708d - Do not refrence memory already freed, thanks to Geoff C. Wing for
the analysis. Closes PR bin/36636.
- Also use the longest string for the column alignment counting all
  sensors available from all devices, not per-device.

Thanks to rmind@ for help.
2007-07-12 18:24:35 +00:00
xtraeme
37b598db93 Add do_envsys() that checks if /etc/envsys.conf exists. 2007-07-12 07:13:07 +00:00
yamt
0fc9d7ee0d after switching to threads:
- g/c SIGCHLD handler.
- pthread_setname_np rather than setproctitle.

the patch provided by Andrew Doran.
2007-07-11 04:59:19 +00:00
jmcneill
afa3505c29 Make trpt build again, based on recent netstat changes. 2007-07-10 22:23:13 +00:00
yamt
cebe06e8e7 use pthread_create instead of fork. 2007-07-10 13:52:51 +00:00
pooka
52c5d7c979 * support non-blocking read/write
* support seek (or actually support failing to seek ...)
2007-07-09 09:28:21 +00:00
pooka
a43c6db049 play it safe: ignore sigpipe 2007-07-08 17:13:24 +00:00
pooka
5e1b81c1b5 Accept user as a flag. This way the usage is fstab-compliant:
mount_9p argument mountpoint
2007-07-08 16:29:29 +00:00
pooka
9d2baecbde build & install puffsportal (if MKPUFFS) 2007-07-08 14:29:52 +00:00
pooka
226c70ad91 Build this as mount_puffsportal for now, so that it can be easily
installed at the same with the regular mount_portal.
2007-07-08 14:27:48 +00:00
pooka
33318660d7 * don't need to define a nop notify, just pass in NULL to init
* remove node's i/o descriptor in reclaim
2007-07-08 11:45:00 +00:00
pooka
e395775675 Add support for non-blocking I/O. Also fixes problems the providers
and popen() caused with concurrent access.

This should match the original portalfs in functionality now.
2007-07-08 10:43:03 +00:00
christos
97dcde77bc - Compile in with debugging by default.
- General cleanup.
2007-07-07 22:33:57 +00:00
pooka
1ad69966c9 I'm fairly certain this file system's type is psshfs, not ppshfs
(how did that manage to be there this long?)
2007-07-07 22:06:09 +00:00
pooka
bfecc30afc adapt to puffs_framebuf changes 2007-07-07 21:14:26 +00:00
xtraeme
ec5dc77a7c tyop 2007-07-05 20:17:43 +00:00
dsl
0c7234ef6a Note here that -e can be used on the pxeboot_ia32.bin file.
(It is already mentioned on the pxeboot(8) page.)
2007-07-05 19:49:53 +00:00
xtraeme
2ce86bd863 Align drive state string like other sensor types. 2007-07-05 14:11:08 +00:00
xtraeme
84b0b63b4c Before checking sensor type:
- check if if its state is invalid
- print the 'N/A' string and continue

This avoids code duplication.
2007-07-05 14:08:37 +00:00
xtraeme
7233bc845c Print invalid state with 'N/A' for Indicators, like any other sensors.
We follow the following scheme now:

value_cur set => ON
value_cur not set => OFF
invalid state => N/A
2007-07-05 13:51:28 +00:00
xtraeme
ada961ab89 Print 'N/A' for invalid sensors rather than an asterisk, with the
exception of Indicator sensors.

Indicator sensors now will print "ON" if they are in valid state, or
"OFF" if they are in invalid state.
2007-07-05 12:11:05 +00:00
xtraeme
96deb6cebd By popular demand, do not skip sensors with invalid state. Print them
with an asterisk, as was suggested by Greg. A. Woods.

Example:

$ ./envstat -dlm0 -s "CPU Fan,System Fan,Aux Fan"
     System Fan:       *
     CPU Fan:       1308 RPM
     Aux Fan:          *
$

Except Integer and Driver sensors, which shouldn't need that.
2007-07-04 19:56:02 +00:00
xtraeme
501645e90d Fix the example that used -s without -d, found by hira@. 2007-07-04 17:16:15 +00:00
xtraeme
5e67825d91 Improve description about the -s flag, it must be used with -d. 2007-07-04 17:15:03 +00:00
xtraeme
196efa6a61 sensor_indicator is able to receive the same events than other sensors. 2007-07-03 08:45:56 +00:00
xtraeme
3ab4d7d8eb Two grammar fixes from Zafer Aydogan. 2007-07-02 20:37:06 +00:00
pooka
330acd4a45 Add initial puffs version of mount_portal, eventually to replace
portalfs.  Uses the same config files etc. as the "regular"
mount_portal, and actually compiles a lot of the code directly from
under src/sbin/mount_portal.

Doesn't yet support concurrent access, but I have a pretty clear
vision on how to neatly fix that.
2007-07-02 18:35:14 +00:00
xtraeme
e9878e8efb Add the /etc/powerd/scripts/sensor_indicator to handle events on
indicator sensors.

Update powerd(8).
2007-07-02 15:26:18 +00:00
pooka
58457f2209 adapt: inactive no longer comes with int *refcount (not that it was
used except for setting the default here anyway)
2007-07-02 10:26:50 +00:00
pooka
6596e0c995 adapt: **newnode etc. pointers -> struct puffs_newinfo 2007-07-01 18:40:15 +00:00
pooka
fe7bbdec69 adapt: pid -> const struct puffs_cid * 2007-07-01 17:23:44 +00:00
xtraeme
4c67d94842 Update for /etc/rc.d/envsys. 2007-07-01 08:30:09 +00:00
xtraeme
af211bb4e3 Imported envsys 2, a brief description of the new features:
(Part 3: userland)

* Support for detachable sensors.
* Cleaned up the API for simplicity and efficiency.
* Ability to send capacity/critical/warning events to powerd(8).
* Adapted all the code to the new locking order.
* Compatibility with the old envsys API: the ENVSYS_GTREINFO
  and ENVSYS_GTREDATA ioctl(2)s are supported.
* Added support for a 'dictionary based communication channel' between
  sysmon_power(9) and powerd(8), that means there is no 32 bytes event
  size restriction anymore.
* Binary compatibility with old envstat(8) and powerd(8) via COMPAT_40.
* All drivers with the n^2 gtredata bug were fixed, PR kern/36226.

Tested by:

blymn: smsc(4).
bouyer: ipmi(4), mfi(4).
kefren: ug(4).
njoly: viaenv(4), adt7463.c.
riz: owtemp(4).
xtraeme: acpiacad(4), acpibat(4), acpitz(4), aiboost(4), it(4), lm(4).
2007-07-01 07:39:45 +00:00
christos
9bba04122f Set the mib appropriately depending on the socket address family.
From (Matthias Drochner).
2007-06-28 18:47:17 +00:00
pooka
a5c38fbcdf g/c bit about MNT_NOATIME being mandatory. it obvious isn't since
the code was #if 0'd out.
2007-06-26 13:20:34 +00:00
pooka
4a403dd973 Fix return value comparison inversion. Makes psshfs work for the
nocache case again, as the server error value for EOF is properly
handled again.
2007-06-26 11:04:29 +00:00
christos
b7ebeed97d fix the assert (from anon ymous) 2007-06-25 23:58:42 +00:00
christos
bfb6cb13d5 Add tcpdrop from {Free,Open}BSD. 2007-06-25 23:34:52 +00:00
christos
5f1a365390 add parens. 2007-06-24 23:25:13 +00:00
pooka
5662e7f720 PUFFS_KFLAG_NOCACHE became two, so introduce the command line options
-o nonamecache and -o nopagecache and adapt file systems where necessary.
2007-06-24 22:18:38 +00:00
christos
2ffe4b875f Use an elf note to handle pax arguments. This is a temporary solution to
avoid wasting OS flag bits. In the future we'll probably use fileassoc to
achieve this (once there is a way to make fileassoc persistent) or in the
shorter term libelf, so that we can add and remove the note on demand instead
of burning bits on each binary. Of course since this is a tool, this means
that we'll need to think about how to handle libelf...
2007-06-24 20:35:36 +00:00
christos
36619a204c Fix white space compression from Jukka Salmi 2007-06-24 19:51:43 +00:00
pooka
91629617de Call puffs_pn_remove() just in case the file server happens to be
quick with recycling qids.
2007-06-24 19:13:39 +00:00
kardel
cf3eceb66e track 4.2.4p2 import 2007-06-24 16:56:48 +00:00
christos
115d8ccfd7 Don't use __arraycount because this is a 700L, and toolz have messed up
includes.
2007-06-23 23:18:29 +00:00
dogcow
a7e26eabfd unb0rk tools/ builds on systems that don't have __arraycount() defined. 2007-06-23 23:07:44 +00:00
christos
335dde11a5 fix usage check. 2007-06-23 17:02:03 +00:00
christos
65c07d0bce fix a comment and use efopen 2007-06-23 16:56:56 +00:00
christos
4f52df9a5e Add a uniq option to delete duplicate entries from the services file. 2007-06-23 16:55:15 +00:00
christos
1d3b6feacb PR/36527: Greg A. Woods: installboot(8) doesn't allow for the valid
consdev=auto setting
2007-06-23 14:46:00 +00:00
pooka
23c0297785 print warning if directory cache invalidation fails 2007-06-21 13:53:00 +00:00
he
3661e4f558 We also need -ltermcap when we use -ledit.
Fixes build problem for sun2.
2007-06-13 07:33:00 +00:00
kiyohara
c6ee19e6af Call openlog() earlier than syslog(). 2007-06-12 10:05:24 +00:00
agc
c3f5008ead Add emulation of "fusermount -V". This prints out the fusermount version
number (which itself is the fuse version emulated, i.e. 2.6.0) on stdout,
and then exits.
2007-06-11 21:16:23 +00:00
christos
1b15aa2347 put back readline. I think I fixed the libedit issue. If I did not, then
we should fix libedit further to be compatible with readline.
2007-06-09 17:33:26 +00:00
pavel
511b2e988c Remove the remaining sendmail config files (including everything in
/usr/share/sendmail) from the obsolete list. Instead, remove them in the
"sendmail" postinstall item, which is disabled by default, to prevent
losing sendmail configuration on upgrade. Fixes the rest of
PR install/36180.
2007-06-08 22:24:07 +00:00
sborrill
9dd4b8a256 wiconfig should exit with status 1 if used on an interface which does
not exist or is not wireless. The previous commit broke this, so add
explicit check before any other task. Approved by dyoung@
2007-06-08 21:47:20 +00:00
rjs
cc949d333c Make format directive match type of of_buflen. 2007-06-06 23:43:56 +00:00
pooka
f8326bf98e Move puffs to a two clause license where it already isn't so. And
as agc pointed out, even files with the third clause were already
effectively two clause because of a slight bug in the language...
2007-06-06 01:54:59 +00:00
christos
2219d66ee7 PR/36440: Martin Husemann: rpcbind complains about non-errors.
Don't complain about EAFNOSUPPORT.
2007-06-04 18:00:51 +00:00
matt
91d658881f ofctl can write its OFW tree to a proplib. (reading from a proplib doesn't
quite work yet).
2007-06-03 03:01:41 +00:00
pavel
9188cd99a0 Separate postinstall checks in two groups: enabled and disabled by
default. Only the former checks/fixes are done if no items are given
on the command line. The latter must be requested explicitely.

Intended for "fixes" that are dangerous in some way, because they might
remove files that are still in use, for example.

Make the "sendmail" item disabled by default, it removes sendmail
configuration. Partly addresses PR install/36180.

Proposed on tech-userlevel, review and spelling fixes from lukem@.
2007-06-02 21:25:08 +00:00
dyoung
0bb998a3f7 Bring the example concerning a bootable ISO9660 for i386 up-to-date,
demonstrating the -e option.
2007-06-01 20:56:23 +00:00
tls
36a21907e2 Since Christos cleaned up the use of libc internals here, we can switch
these from USE_SSP to USE_FORT as they should be.
2007-05-28 18:12:06 +00:00
christos
599840187d get rid of libc cruft. requested by tls 2007-05-28 14:49:15 +00:00
tls
4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
tls
7d2d02742e Revert previous: the readline support here does unspeakable things with
the history buffer that require knowledge of the readline internals to
make safe (it "knows" that GNU readline mallocs certain returned data,
and thus, with libedit, happily calls free on static variables).
2007-05-28 03:28:58 +00:00
christos
1b3a5dad50 turn on command line editing. 2007-05-27 19:46:31 +00:00
tls
e87faddb31 Gross workaround for PR 36390: don't overwrite the stack with zeroes when
using struct sockaddr_dl in an ifreq.
2007-05-27 18:11:38 +00:00
tls
be45f4d02a For FORTIFY_SOURCE: do not pretend to convert code from b* to mem* by
using a #define to turn one into the other, this is pointless and causes
more portability issues than it solves (admittedly, in the year 1702 when
this code was written the opposite may have been the case).
2007-05-27 16:31:41 +00:00
jmmv
fadca732d6 Guess the terminal size on each change instead of during program startup.
This allows the mouse to be used properly in consoles with different sizes:
before this change it was restricted to the size reported by the console
used to start the daemon.

Problem reported by Blair Sadewitz.
2007-05-27 15:05:00 +00:00
christos
e3277e1c36 don't look at the wrong structure to bring the interface down. Also keep
track of state, and bring the interface back up. This should be pulled to
4.0.
2007-05-27 03:15:34 +00:00
christos
1681ee0f39 unregister the read socket when we deinit, otherwise the stale socket stays
in the select mask, select fails with EBADFD and wpa_supplicant exits. This
should be pulled to 4.0.
2007-05-27 03:14:32 +00:00
macallan
b1563bcc6b build ofctl on sparc 2007-05-25 18:27:25 +00:00
macallan
74ab4a8402 make this work with OBP2 2007-05-25 18:27:05 +00:00
pooka
464b354e31 devnullify ssh process's stderr to avoid tty spam 2007-05-21 08:55:04 +00:00
pooka
d32c8fa56b In case we are really tight on vnodes, the directory vnode might
be reclaimed from under while we are warming the getattr cache.
Shuffle some code to prevent the effects.  Theoretically the race
is still possible, but I don't think it will happen in practice.
In any case, the code could benefit from some more dusting.
2007-05-20 20:27:04 +00:00
pooka
4bc09685b9 Observe that when doing ls -l, the attributes of the first file
getattr are usually still outstanding when we already would like
the result.  Instead of issueing another stat which will be serviced
only after all the other entries in the directory, record all the
outgoing readdir getattr buffers and if we encounter an outstanding
request when we need to fetch attrs, do a puffs_framev_framebuf_ccpromote()
wait for it instead of firing off the second query.  This shaves
almost 10% off the time for ls -lR.

Also, get rid of the SUPERREADDIR conditional, since it has penetrated
the code quite a bit and the #ifdef SUPERREADDIRs were starting to
look like tagliatelle alla bolognese (n.b. I love how it looks,
but I wouldn't like it either if my tagliatelle alla bolognese
looked like psshfs code).  Maybe it should be re-introduced in the
form of a switch?
2007-05-20 20:06:23 +00:00
pooka
a769baf075 Implement SUPERREADDIR (like nfs readdirplus) getattr cache warming
a bit differently: when reading the directory, store all getattr
caching queries and fire off only when the directory read is
complete.  That way the common sequence is not [readdir, lots of
async getattr requests, readdir EOF] but rather [readdir, readdir
EOF, lots of async getattr].  This speeds up ls -lR by about 25%
(on my LAN).
2007-05-20 17:47:12 +00:00
pooka
7c537b89eb Change the signature of puffs_respcmp to return -1,0,1 for smaller,
equal, larger, respectively instead of 0/1 for non/equal.  This
will allow sorting the buffers for faster matching in libpuffs.
While here, change the name from respcmp to framecmp, as that better
reflects the purpose.

NOTE!  there is no obvious way to make compilation fail for file
systems which may already be using this feature (although I don't
think there are any outside our tree, as the feature is two weeks
old).  Nevertheless, non-updated file systems will fail very quickly.
2007-05-20 16:24:37 +00:00
seb
d4373f6dcf Update pathnames to the services and netgroups databases after their move
to /var/db.

Pooka@ made me do it.
2007-05-20 14:02:10 +00:00
wiz
0946d2d22d Improve wording for -T. 2007-05-19 14:41:13 +00:00
wiz
b95973aaa7 Sort sections. Use Po/Pc to avoid weird Xr arguments. 2007-05-19 14:18:33 +00:00
pooka
b283afddec support reclaim. set noref setback when removing a node to prompt
immediate reclaim.
2007-05-19 10:38:23 +00:00
pooka
423fa255c6 remove obvious incorrect assert() from doreclaim() and remove the
whole PSN_NUKED bit - it's not very useful because of the noref setback.
2007-05-18 18:00:07 +00:00
pooka
f98f18ebad * use NOREF setback to prompt immediate (well, once the kernel
reference count goes to 0) reclaim of deleted nodes as opposed to
  waiting for the system to start reclaiming the freelist
* combine some nodeflags from different variable to one status variable
2007-05-18 16:13:47 +00:00
pooka
c8b0a89198 reflect changes in fs mount: use puffs_mount() instead of
puffs_domount() & puffs_start()
2007-05-17 14:13:04 +00:00
christos
b0d544666a whitespace fixes. 2007-05-17 00:36:31 +00:00
christos
7ac2181da6 Deal with delta being negative on machines which signed shifts don't shift 1's. 2007-05-17 00:36:12 +00:00
agc
e54f9cf6a0 Add an example to the manual page. 2007-05-16 21:16:31 +00:00
christos
0eeca5df9e coverity CID 1220: Don't use size_t for return of read. 2007-05-16 20:45:45 +00:00
christos
724513abed deal with namespace pollution caused by tcpd. 2007-05-16 14:42:07 +00:00
pooka
c1f0cc6870 Add error parameter to puffs_framev_cb to signal if there is a
result of if the function should just do resource cleanup.
2007-05-16 10:04:08 +00:00
pooka
0b0e609b9b Enhance the GETRESPONSE, JUSTSEND and SENDCB macros to process the
return value from the network layer.
2007-05-16 09:57:21 +00:00
taca
8ea4278bd9 printtqtable.c was added to libipf. 2007-05-16 04:26:07 +00:00