~ubuntu-branches/ubuntu/oneiric/collectd/oneiric

« back to all changes in this revision

Viewing changes to src/cpu.c

  • Committer: Bazaar Package Importer
  • Author(s): Morten Kjeldgaard
  • Date: 2008-11-18 15:54:20 UTC
  • mfrom: (1.1.5 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20081118155420-sc2mxv2pebafkmon
Tags: 4.4.2-2ubuntu1
* Merge from Debian unstable (LP: #298828). Remaining Ubuntu changes:
* Add ubuntu_in6-glibc28.dpatch patch, fix FTBFS.
* Add ubuntu_hardening.dpatch patch, fix FTBFS.
* Add ubuntu_perl.c.dpatch, fix FTBFS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
        vl.values = values;
181
181
        vl.values_len = 1;
182
182
        vl.time = time (NULL);
183
 
        strcpy (vl.host, hostname_g);
184
 
        strcpy (vl.plugin, "cpu");
 
183
        sstrncpy (vl.host, hostname_g, sizeof (vl.host));
 
184
        sstrncpy (vl.plugin, "cpu", sizeof (vl.plugin));
185
185
        snprintf (vl.plugin_instance, sizeof (vl.type_instance),
186
186
                        "%i", cpu_num);
187
187
        vl.plugin_instance[DATA_MAX_NAME_LEN - 1] = '\0';
188
 
        strcpy (vl.type_instance, type_instance);
 
188
        sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
189
189
 
190
190
        plugin_dispatch_values ("cpu", &vl);
191
191
}