- Changed strncpy to strlcpy, strncat to strlcat

- Added strlcpy and strlcat to SICS
- Added a driver for the POLDI power supplies


SKIPPED:
	psi/A1931.c
	psi/autowin.c
	psi/bruker.c
	psi/docho.c
	psi/dornier2.c
	psi/dspcode.c
	psi/ease.c
	psi/ecb.c
	psi/ecbcounter.c
	psi/ecbdriv.c
	psi/el734dc.c
	psi/el734driv.c
	psi/el734hp.c
	psi/el737driv.c
	psi/el737hpdriv.c
	psi/el737hpdrivsps.c
	psi/el737hpv2driv.c
	psi/el755driv.c
	psi/eurodriv.c
	psi/haakedriv.c
	psi/itc4driv.c
	psi/julcho.c
	psi/linadriv.c
	psi/lmd200.c
	psi/lscsupport.c
	psi/ltc11.c
	psi/make_gen
	psi/oicom.c
	psi/oxinst.c
	psi/pimotor.c
	psi/pipiezo.c
	psi/polterwrite.c
	psi/psi.c
	psi/sanscook.c
	psi/sanslirebin.c
	psi/sanswave.c
	psi/sinqhmdriv.c
	psi/sinqhttp.c
	psi/slsecho.c
	psi/slsmagnet.c
	psi/slsvme.c
	psi/sps.c
	psi/swmotor.c
	psi/swmotor2.c
	psi/tabledrive.c
	psi/tasscan.c
	psi/tdchm.c
	psi/velodorn.c
	psi/velodornier.c
This commit is contained in:
koennecke
2010-04-13 15:08:38 +00:00
parent d19e3e5ca9
commit b26b8fc735
83 changed files with 555 additions and 316 deletions

View File

@@ -418,30 +418,30 @@ static int ECBGetError(struct __COUNTER *self, int *iCode,
*iCode = self->iErrorCode;
switch (self->iErrorCode) {
case COMMERROR:
strncpy(errorText, "Communication error with ECB", errlen);
strlcpy(errorText, "Communication error with ECB", errlen);
break;
case TOMANYCOUNTS:
strncpy(errorText, "Preset is to high!", errlen);
strlcpy(errorText, "Preset is to high!", errlen);
break;
case NOSEND:
strncpy(errorText, "Cannot send naked data to ECB", errlen);
strlcpy(errorText, "Cannot send naked data to ECB", errlen);
break;
case UNKNOWNPAR:
strncpy(errorText, "parameter unknown", errlen);
strlcpy(errorText, "parameter unknown", errlen);
break;
case INVALIDCOUNTER:
strncpy(errorText, "Invalid counter number requested, 0-7 allowed",
strlcpy(errorText, "Invalid counter number requested, 0-7 allowed",
errlen);
break;
case INVALIDPRESCALER:
strncpy(errorText, "Invalid prescaler value, allowed 1 or 10", errlen);
strlcpy(errorText, "Invalid prescaler value, allowed 1 or 10", errlen);
break;
case BADFREQ:
strncpy(errorText, "Bad timer frequency: 10 or 1000 allowed", errlen);
strlcpy(errorText, "Bad timer frequency: 10 or 1000 allowed", errlen);
break;
default:
sprintf(pBueffel, "Unknown error code %d", self->iErrorCode);
strncpy(errorText, pBueffel, errlen);
strlcpy(errorText, pBueffel, errlen);
break;
}
return 1;
@@ -563,7 +563,7 @@ static int ECBGet(struct __COUNTER *self, char *name,
static int ECBSend(struct __COUNTER *self, char *text,
char *reply, int replylen)
{
strncpy(reply, "ECB does not feast on ASCII strings, refused!",
strlcpy(reply, "ECB does not feast on ASCII strings, refused!",
replylen);
return OKOK;
}