~ubuntu-branches/ubuntu/precise/net-snmp/precise

« back to all changes in this revision

Viewing changes to agent/mibgroup/host/hr_disk.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-11-26 01:27:00 UTC
  • mfrom: (1.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091126012700-pox7w0a5j2x305h9
Tags: 5.4.2.1~dfsg-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - Set Ubuntu maintainer address.
  - net-snmp-config: Use bash. (LP: #104738)
  - Removed multiuser option when calling update-rc.d. (LP: #254261)
  - debian/snmpd.init: LSBify the init script.
  - debian/patches/52_fix_snmpcmd_1_typo.patch: Adjust a typo in snmpcmd.1
    (LP: #250459)
  - debian/patches/99-fix-ubuntu-div0.patch: Fix dvision by zero.
    (LP: #426813).
 * Dropped patches:
   - debian/patches/101-fix-ipalias.patch: Applied upstream.
   - debian/patches/99-fix-net-snmp-syslog.patch: Applied upstream.
   - debian/patches/99-fix-perl-counter-in-subagent.patch: Applied upstream.
   - ebian/patches/103-fix-ubuntu-lmsensors.patch: No longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
694
694
             * Construct the full device name in "string" 
695
695
             */
696
696
            if (disk_devices[HRD_type_index].disk_controller != -1) {
697
 
                snprintf(string, sizeof(string),
 
697
                snprintf(string, sizeof(string)-1,
698
698
                        disk_devices[HRD_type_index].disk_devfull_string,
699
699
                        disk_devices[HRD_type_index].disk_controller,
700
700
                        disk_devices[HRD_type_index].disk_device_first +
701
701
                        HRD_index);
702
702
            } else {
703
 
                snprintf(string, sizeof(string),
 
703
                snprintf(string, sizeof(string)-1,
704
704
                        disk_devices[HRD_type_index].disk_devfull_string,
705
705
                        disk_devices[HRD_type_index].disk_device_first +
706
706
                        HRD_index);
779
779
     * Construct the partition name in "string" 
780
780
     */
781
781
    if (disk_devices[HRD_type_index].disk_controller != -1) {
782
 
        snprintf(string, str_len,
 
782
        snprintf(string, str_len-1,
783
783
                disk_devices[HRD_type_index].disk_devpart_string,
784
784
                disk_devices[HRD_type_index].disk_controller,
785
785
                disk_devices[HRD_type_index].disk_device_first + HRD_index,
786
786
                disk_devices[HRD_type_index].disk_partition_first +
787
787
                HRP_index);
788
788
    } else {
789
 
        snprintf(string, str_len,
 
789
        snprintf(string, str_len-1,
790
790
                disk_devices[HRD_type_index].disk_devpart_string,
791
791
                disk_devices[HRD_type_index].disk_device_first + HRD_index,
792
792
                disk_devices[HRD_type_index].disk_partition_first +