ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/disk_stats.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/disk_stats.c (file contents):
Revision 1.56 by ats, Sun Apr 4 22:18:38 2004 UTC vs.
Revision 1.66 by tdb, Wed Apr 7 19:26:16 2004 UTC

# Line 1 | Line 1
1   /*
2 < * i-scream central monitoring system
2 > * i-scream libstatgrab
3   * http://www.i-scream.org
4   * Copyright (C) 2000-2004 i-scream
5   *
# Line 31 | Line 31
31   #include <time.h>
32   #include "statgrab.h"
33   #include "vector.h"
34 + #include "tools.h"
35  
36   #ifdef SOLARIS
37   #include <sys/mnttab.h>
# Line 42 | Line 43
43   #if defined(LINUX) || defined(CYGWIN)
44   #include <mntent.h>
45   #include <sys/vfs.h>
45 #include "tools.h"
46   #endif
47  
48   #ifdef LINUX
49   #define VALID_FS_TYPES {"adfs", "affs", "befs", "bfs", "efs", "ext2", \
50 <                        "ext3", "vxfs", "hfs", "hfsplus", "hpfs", "jffs", \
51 <                        "jffs2", "minix", "msdos", "ntfs", "qnx4", "ramfs", \
52 <                        "rootfs", "reiserfs", "sysv", "v7", "udf", "ufs", \
53 <                        "umsdos", "vfat", "xfs", "jfs"}
50 >                        "ext3", "vxfs", "hfs", "hfsplus", "hpfs", "jffs", \
51 >                        "jffs2", "minix", "msdos", "ntfs", "qnx4", "ramfs", \
52 >                        "rootfs", "reiserfs", "sysv", "v7", "udf", "ufs", \
53 >                        "umsdos", "vfat", "xfs", "jfs"}
54   #endif
55  
56   #ifdef CYGWIN
# Line 66 | Line 66
66   #include <sys/dkstat.h>
67   #include <devstat.h>
68   #define VALID_FS_TYPES {"hpfs", "msdosfs", "ntfs", "udf", "ext2fs", \
69 <                        "ufs", "mfs"}
69 >                        "ufs", "mfs"}
70   #endif
71   #if defined(NETBSD) || defined(OPENBSD)
72   #include <sys/param.h>
73   #include <sys/sysctl.h>
74   #include <sys/disk.h>
75   #define VALID_FS_TYPES {"ffs", "mfs", "msdos", "lfs", "adosfs", "ext2fs", \
76 <                        "ntfs"}
76 >                        "ntfs"}
77   #endif
78  
79 < char *copy_string(char *orig_ptr, const char *newtext){
80 <
81 <        /* Maybe free if not NULL, and strdup rather than realloc and strcpy? */
82 <        orig_ptr=realloc(orig_ptr, (1+strlen(newtext)));
83 <        if(orig_ptr==NULL){
84 <                return NULL;
85 <        }
86 <        strcpy(orig_ptr, newtext);
87 <
88 <        return orig_ptr;
89 < }
90 <
91 < static void disk_stat_init(disk_stat_t *d) {
79 > static void disk_stat_init(sg_fs_stats *d) {
80          d->device_name = NULL;
81          d->fs_type = NULL;
82          d->mnt_point = NULL;
83   }
84  
85 < static void disk_stat_destroy(disk_stat_t *d) {
85 > static void disk_stat_destroy(sg_fs_stats *d) {
86          free(d->device_name);
87          free(d->fs_type);
88          free(d->mnt_point);
89   }
90  
91 < int is_valid_fs_type(const char *type) {
91 > static int is_valid_fs_type(const char *type) {
92          const char *types[] = VALID_FS_TYPES;
93          int i;
94  
# Line 112 | Line 100 | int is_valid_fs_type(const char *type) {
100          return 0;
101   }
102  
103 < disk_stat_t *get_disk_stats(int *entries){
104 <        VECTOR_DECLARE_STATIC(disk_stats, disk_stat_t, 10,
105 <                              disk_stat_init, disk_stat_destroy);
103 > sg_fs_stats *sg_get_fs_stats(int *entries){
104 >        VECTOR_DECLARE_STATIC(disk_stats, sg_fs_stats, 10,
105 >                              disk_stat_init, disk_stat_destroy);
106  
107          int valid_type;
108          int num_disks=0;
# Line 122 | Line 110 | disk_stat_t *get_disk_stats(int *entries){
110          FILE *f;
111   #endif
112  
113 <        disk_stat_t *disk_ptr;
113 >        sg_fs_stats *disk_ptr;
114  
115   #ifdef SOLARIS
116          struct mnttab mp;
# Line 140 | Line 128 | disk_stat_t *get_disk_stats(int *entries){
128   #ifdef ALLBSD
129          nummnt=getmntinfo(&mp , MNT_LOCAL);
130          if (nummnt<=0){
131 +                sg_set_error(SG_ERROR_GETMNTINFO, NULL);
132                  return NULL;
133          }
134          for(;nummnt--; mp++){
# Line 148 | Line 137 | disk_stat_t *get_disk_stats(int *entries){
137  
138   #if defined(LINUX) || defined(CYGWIN)
139          if ((f=setmntent("/etc/mtab", "r" ))==NULL){
140 +                sg_set_error(SG_ERROR_SETMNTENT, NULL);
141                  return NULL;
142          }
143  
# Line 161 | Line 151 | disk_stat_t *get_disk_stats(int *entries){
151  
152   #ifdef SOLARIS
153          if ((f=fopen("/etc/mnttab", "r" ))==NULL){
154 +                sg_set_error(SG_ERROR_OPEN, "/etc/mnttab");
155                  return NULL;
156          }
157          while((getmntent(f, &mp)) == 0){
# Line 177 | Line 168 | disk_stat_t *get_disk_stats(int *entries){
168                          disk_ptr=disk_stats+num_disks;
169  
170   #ifdef ALLBSD
171 <                        if((disk_ptr->device_name=copy_string(disk_ptr->device_name, mp->f_mntfromname))==NULL){
171 >                        if (sg_update_string(&disk_ptr->device_name, mp->f_mntfromname) < 0) {
172                                  return NULL;
173                          }
174 <
184 <                        if((disk_ptr->fs_type=copy_string(disk_ptr->fs_type, mp->f_fstypename))==NULL){
174 >                        if (sg_update_string(&disk_ptr->fs_type, mp->f_fstypename) < 0) {
175                                  return NULL;
176                          }
177 <
188 <                        if((disk_ptr->mnt_point=copy_string(disk_ptr->mnt_point, mp->f_mntonname))==NULL){
177 >                        if (sg_update_string(&disk_ptr->mnt_point, mp->f_mntonname) < 0) {
178                                  return NULL;
179                          }
180  
# Line 199 | Line 188 | disk_stat_t *get_disk_stats(int *entries){
188                          disk_ptr->used_inodes=disk_ptr->total_inodes-disk_ptr->free_inodes;
189   #endif
190   #if defined(LINUX) || defined(CYGWIN)
191 <                        if((disk_ptr->device_name=copy_string(disk_ptr->device_name, mp->mnt_fsname))==NULL){
191 >                        if (sg_update_string(&disk_ptr->device_name, mp->mnt_fsname) < 0) {
192                                  return NULL;
193                          }
194                                  
195 <                        if((disk_ptr->fs_type=copy_string(disk_ptr->fs_type, mp->mnt_type))==NULL){    
195 >                        if (sg_update_string(&disk_ptr->fs_type, mp->mnt_type) < 0) {  
196                                  return NULL;
197                          }
198  
199 <                        if((disk_ptr->mnt_point=copy_string(disk_ptr->mnt_point, mp->mnt_dir))==NULL){
199 >                        if (sg_update_string(&disk_ptr->mnt_point, mp->mnt_dir) < 0) {
200                                  return NULL;
201                          }
202                          disk_ptr->size = (long long)fs.f_bsize * (long long)fs.f_blocks;
# Line 221 | Line 210 | disk_stat_t *get_disk_stats(int *entries){
210   #endif
211  
212   #ifdef SOLARIS
224                        /* Memory leak in event of realloc failing */
213                          /* Maybe make this char[bigenough] and do strncpy's and put a null in the end?
214                           * Downside is its a bit hungry for a lot of mounts, as MNT_MAX_SIZE would prob
215                           * be upwards of a k each
216                           */
217 <                        if((disk_ptr->device_name=copy_string(disk_ptr->device_name, mp.mnt_special))==NULL){
217 >                        if (sg_update_string(&disk_ptr->device_name, mp.mnt_special) < 0) {
218                                  return NULL;
219                          }
220  
221 <                        if((disk_ptr->fs_type=copy_string(disk_ptr->fs_type, mp.mnt_fstype))==NULL){
222 <                                return NULL;
223 <                        }
221 >                        if (sg_update_string(&disk_ptr->fs_type, mp.mnt_fstype) < 0) {
222 >                                return NULL;
223 >                        }
224          
225 <                        if((disk_ptr->mnt_point=copy_string(disk_ptr->mnt_point, mp.mnt_mountp))==NULL){
226 <                                return NULL;
227 <                        }
225 >                        if (sg_update_string(&disk_ptr->mnt_point, mp.mnt_mountp) < 0) {
226 >                                return NULL;
227 >                        }
228                          
229                          disk_ptr->size = (long long)fs.f_frsize * (long long)fs.f_blocks;
230                          disk_ptr->avail = (long long)fs.f_frsize * (long long)fs.f_bavail;
# Line 253 | Line 241 | disk_stat_t *get_disk_stats(int *entries){
241          *entries=num_disks;    
242  
243          /* If this fails, there is very little i can do about it, so
244 <           I'll ignore it :) */
244 >           I'll ignore it :) */
245   #if defined(LINUX) || defined(CYGWIN)
246          endmntent(f);
247   #endif
# Line 265 | Line 253 | disk_stat_t *get_disk_stats(int *entries){
253  
254   }
255  
256 < static void diskio_stat_init(diskio_stat_t *d) {
256 > static void diskio_stat_init(sg_disk_io_stats *d) {
257          d->disk_name = NULL;
258   }
259  
260 < static void diskio_stat_destroy(diskio_stat_t *d) {
260 > static void diskio_stat_destroy(sg_disk_io_stats *d) {
261          free(d->disk_name);
262   }
263  
264 < VECTOR_DECLARE_STATIC(diskio_stats, diskio_stat_t, 10,
265 <                      diskio_stat_init, diskio_stat_destroy);
264 > VECTOR_DECLARE_STATIC(diskio_stats, sg_disk_io_stats, 10,
265 >                      diskio_stat_init, diskio_stat_destroy);
266  
267   #ifdef LINUX
268   typedef struct {
# Line 283 | Line 271 | typedef struct {
271   } partition;
272   #endif
273  
274 < diskio_stat_t *get_diskio_stats(int *entries){
274 > sg_disk_io_stats *sg_get_disk_io_stats(int *entries){
275          int num_diskio;
276   #ifndef LINUX
277 <        diskio_stat_t *diskio_stats_ptr;
277 >        sg_disk_io_stats *diskio_stats_ptr;
278   #endif
279  
280   #ifdef SOLARIS
281 <        kstat_ctl_t *kc;
282 <        kstat_t *ksp;
281 >        kstat_ctl_t *kc;
282 >        kstat_t *ksp;
283          kstat_io_t kios;
284   #endif
285   #ifdef LINUX
# Line 299 | Line 287 | diskio_stat_t *get_diskio_stats(int *entries){
287          char *line_ptr;
288          int major, minor;
289          int has_pp_stats = 1;
290 <        static partition *parts = NULL;
303 <        static int alloc_parts = 0;
290 >        VECTOR_DECLARE_STATIC(parts, partition, 16, NULL, NULL);
291          int i, n;
292          time_t now;
293          const char *format;
# Line 343 | Line 330 | diskio_stat_t *get_diskio_stats(int *entries){
330  
331          size = sizeof(diskcount);
332          if (sysctl(mib, MIBSIZE, &diskcount, &size, NULL, 0) < 0) {
333 +                sg_error(SG_ERROR_SYSCTL, "CTL_HW.HW_DISKCOUNT");
334                  return NULL;
335          }
336  
# Line 350 | Line 338 | diskio_stat_t *get_diskio_stats(int *entries){
338          mib[1] = HW_DISKNAMES;
339  
340          if (sysctl(mib, MIBSIZE, NULL, &size, NULL, 0) < 0) {
341 +                sg_error(SG_ERROR_SYSCTL, "CTL_HW.HW_DISKNAMES");
342                  return NULL;
343          }
344  
345 <        disknames = malloc(size);
345 >        disknames = sg_malloc(size);
346          if (disknames == NULL) {
347                  return NULL;
348          }
349  
350          if (sysctl(mib, MIBSIZE, disknames, &size, NULL, 0) < 0) {
351 +                sg_error(SG_ERROR_SYSCTL, "CTL_HW.HW_DISKNAMES");
352                  return NULL;
353          }
354  
355 <        dk_name = calloc(diskcount, sizeof(char *));
355 >        dk_name = sg_malloc(diskcount * sizeof(char *));
356          bufpp = disknames;
357          for (i = 0; i < diskcount && (name = strsep(&bufpp, ",")) != NULL; i++) {
358                  dk_name[i] = name;
# Line 377 | Line 367 | diskio_stat_t *get_diskio_stats(int *entries){
367   #endif
368  
369          if (sysctl(mib, MIBSIZE, NULL, &size, NULL, 0) < 0) {
370 +                sg_error(SG_ERROR_SYSCTL, "CTL_HW.HW_DISKSTATS");
371                  return NULL;
372          }
373  
# Line 386 | Line 377 | diskio_stat_t *get_diskio_stats(int *entries){
377          num_disks = size / sizeof(struct diskstats);
378   #endif
379  
380 <        stats = malloc(size);
380 >        stats = sg_malloc(size);
381          if (stats == NULL) {
382                  return NULL;
383          }
384  
385          if (sysctl(mib, MIBSIZE, stats, &size, NULL, 0) < 0) {
386 +                sg_error(SG_ERROR_SYSCTL, "CTL_HW.HW_DISKSTATS");
387                  return NULL;
388          }
389  
390          for (i = 0; i < num_disks; i++) {
391 +                const char *name;
392                  u_int64_t rbytes, wbytes;
393  
394   #ifdef NETBSD
# Line 422 | Line 415 | diskio_stat_t *get_diskio_stats(int *entries){
415                  
416                  diskio_stats_ptr->read_bytes = rbytes;
417                  diskio_stats_ptr->write_bytes = wbytes;
425                if (diskio_stats_ptr->disk_name != NULL) {
426                        free(diskio_stats_ptr->disk_name);
427                }
418   #ifdef NETBSD
419 <                diskio_stats_ptr->disk_name = strdup(stats[i].dk_name);
419 >                name = stats[i].dk_name;
420   #else
421 <                diskio_stats_ptr->disk_name = strdup(dk_name[i]);
421 >                name = dk_name[i];
422   #endif
423 +                if (sg_update_string(&diskio_stats_ptr->disk_name, name) < 0) {
424 +                        return NULL;
425 +                }
426                  diskio_stats_ptr->systime = time(NULL);
427          
428                  num_diskio++;  
# Line 444 | Line 437 | diskio_stat_t *get_diskio_stats(int *entries){
437  
438   #if defined(FREEBSD) || defined(DFBSD)
439          if (!stats_init) {
440 <                stats.dinfo=malloc(sizeof(struct devinfo));
440 >                stats.dinfo=sg_malloc(sizeof(struct devinfo));
441                  if(stats.dinfo==NULL) return NULL;
442                  bzero(stats.dinfo, sizeof(struct devinfo));
443                  stats_init = 1;
444          }
445   #ifdef FREEBSD5
446 <        if ((devstat_getdevs(NULL, &stats)) < 0) return NULL;
446 >        if ((devstat_getdevs(NULL, &stats)) < 0) {
447 >                sg_set_error(SG_ERROR_DEVSTAT_GETDEVS, NULL);
448 >                return NULL;
449 >        }
450          /* Not aware of a get all devices, so i said 999. If we ever
451           * find a machine with more than 999 disks, then i'll change
452           * this number :)
453           */
454 <        if (devstat_selectdevs(&dev_sel, &n_selected, &n_selections, &sel_gen, stats.dinfo->generation, stats.dinfo->devices, stats.dinfo->numdevs, NULL, 0, NULL, 0, DS_SELECT_ONLY, 999, 1) < 0) return NULL;
454 >        if (devstat_selectdevs(&dev_sel, &n_selected, &n_selections, &sel_gen, stats.dinfo->generation, stats.dinfo->devices, stats.dinfo->numdevs, NULL, 0, NULL, 0, DS_SELECT_ONLY, 999, 1) < 0) {
455 >                sg_set_error(SG_ERROR_DEVSTAT_SELECTDEVS, NULL);
456 >                return NULL;
457 >        }
458   #else
459 <        if ((getdevs(&stats)) < 0) return NULL;
459 >        if ((getdevs(&stats)) < 0) {
460 >                sg_set_error(SG_ERROR_DEVSTAT_GETDEVS, NULL);
461 >                return NULL;
462 >        }
463          /* Not aware of a get all devices, so i said 999. If we ever
464           * find a machine with more than 999 disks, then i'll change
465           * this number :)
466           */
467 <        if (selectdevs(&dev_sel, &n_selected, &n_selections, &sel_gen, stats.dinfo->generation, stats.dinfo->devices, stats.dinfo->numdevs, NULL, 0, NULL, 0, DS_SELECT_ONLY, 999, 1) < 0) return NULL;
467 >        if (selectdevs(&dev_sel, &n_selected, &n_selections, &sel_gen, stats.dinfo->generation, stats.dinfo->devices, stats.dinfo->numdevs, NULL, 0, NULL, 0, DS_SELECT_ONLY, 999, 1) < 0) {
468 >                sg_set_error(SG_ERROR_DEVSTAT_SELECTDEVS, NULL);
469 >                return NULL;
470 >        }
471   #endif
472  
473          for(counter=0;counter<stats.dinfo->numdevs;counter++){
# Line 491 | Line 496 | diskio_stat_t *get_diskio_stats(int *entries){
496                  diskio_stats_ptr->write_bytes=dev_ptr->bytes_written;
497   #endif
498                  if(diskio_stats_ptr->disk_name!=NULL) free(diskio_stats_ptr->disk_name);
499 <                asprintf((&diskio_stats_ptr->disk_name), "%s%d", dev_ptr->device_name, dev_ptr->unit_number);
499 >                if (asprintf((&diskio_stats_ptr->disk_name), "%s%d", dev_ptr->device_name, dev_ptr->unit_number) == -1) {
500 >                        sg_set_error(SG_ERROR_ASPRINTF, NULL);
501 >                        return NULL;
502 >                }
503                  diskio_stats_ptr->systime=time(NULL);
504  
505                  num_diskio++;
# Line 501 | Line 509 | diskio_stat_t *get_diskio_stats(int *entries){
509   #endif
510   #ifdef SOLARIS
511          if ((kc = kstat_open()) == NULL) {
512 <                return NULL;
513 <        }
512 >                sg_set_error(SG_ERROR_KSTAT_OPEN, NULL);
513 >                return NULL;
514 >        }
515  
516          for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) {
517 <                if (!strcmp(ksp->ks_class, "disk")) {
517 >                if (!strcmp(ksp->ks_class, "disk")) {
518  
519                          if(ksp->ks_type != KSTAT_TYPE_IO) continue;
520                          /* We dont want metadevices appearins as num_diskio */
521                          if(strcmp(ksp->ks_module, "md")==0) continue;
522 <                        if((kstat_read(kc, ksp, &kios))==-1){  
522 >                        if((kstat_read(kc, ksp, &kios))==-1){  
523                          }
524                          
525                          if (VECTOR_RESIZE(diskio_stats, num_diskio + 1) < 0) {
# Line 520 | Line 529 | diskio_stat_t *get_diskio_stats(int *entries){
529                          diskio_stats_ptr=diskio_stats+num_diskio;
530                          
531                          diskio_stats_ptr->read_bytes=kios.nread;
523                        
532                          diskio_stats_ptr->write_bytes=kios.nwritten;
533 <
534 <                        if(diskio_stats_ptr->disk_name!=NULL) free(diskio_stats_ptr->disk_name);
535 <
536 <                        diskio_stats_ptr->disk_name=strdup((char *) get_svr_from_bsd(ksp->ks_name));
533 >                        if (sg_update_string(&diskio_stats_ptr->disk_name,
534 >                                             sg_get_svr_from_bsd(ksp->ks_name)) < 0) {
535 >                                return NULL;
536 >                        }
537                          diskio_stats_ptr->systime=time(NULL);
538 +
539                          num_diskio++;
540                  }
541          }
# Line 552 | Line 561 | diskio_stat_t *get_diskio_stats(int *entries){
561          if (f == NULL) goto out;
562          now = time(NULL);
563  
564 <        while ((line_ptr = f_read_line(f, "")) != NULL) {
564 >        while ((line_ptr = sg_f_read_line(f, "")) != NULL) {
565                  char name[100];
566                  char *s;
567                  long long rsect, wsect;
# Line 577 | Line 586 | diskio_stat_t *get_diskio_stats(int *entries){
586                  if (VECTOR_RESIZE(diskio_stats, n + 1) < 0) {
587                          goto out;
588                  }
589 <                if (n >= alloc_parts) {
590 <                        alloc_parts += 16;
582 <                        parts = realloc(parts, alloc_parts * sizeof *parts);
583 <                        if (parts == NULL) {
584 <                                alloc_parts = 0;
585 <                                goto out;
586 <                        }
589 >                if (VECTOR_RESIZE(parts, n + 1) < 0) {
590 >                        goto out;
591                  }
592  
593 <                if (diskio_stats[n].disk_name != NULL)
594 <                        free(diskio_stats[n].disk_name);
595 <                diskio_stats[n].disk_name = strdup(name);
593 >                if (sg_update_string(&diskio_stats[n].disk_name, name) < 0) {
594 >                        goto out;
595 >                }
596                  diskio_stats[n].read_bytes = rsect * 512;
597                  diskio_stats[n].write_bytes = wsect * 512;
598                  diskio_stats[n].systime = now;
# Line 610 | Line 614 | diskio_stat_t *get_diskio_stats(int *entries){
614                  if (f == NULL) goto out;
615                  now = time(NULL);
616          
617 <                line_ptr = f_read_line(f, "disk_io:");
617 >                line_ptr = sg_f_read_line(f, "disk_io:");
618                  if (line_ptr == NULL) goto out;
619          
620                  while((line_ptr=strchr(line_ptr, ' '))!=NULL){
# Line 674 | Line 678 | out:
678   #endif
679  
680   #ifdef CYGWIN
681 +        sg_set_error(SG_ERROR_UNSUPPORTED, "Cygwin");
682          return NULL;
683   #endif
684  
# Line 682 | Line 687 | out:
687          return diskio_stats;
688   }
689  
690 < diskio_stat_t *get_diskio_stats_diff(int *entries){
691 <        VECTOR_DECLARE_STATIC(diff, diskio_stat_t, 1,
692 <                              diskio_stat_init, diskio_stat_destroy);
693 <        diskio_stat_t *src = NULL, *dest;
690 > sg_disk_io_stats *sg_get_disk_io_stats_diff(int *entries){
691 >        VECTOR_DECLARE_STATIC(diff, sg_disk_io_stats, 1,
692 >                              diskio_stat_init, diskio_stat_destroy);
693 >        sg_disk_io_stats *src = NULL, *dest;
694          int i, j, diff_count, new_count;
695  
696          if (diskio_stats == NULL) {
697                  /* No previous stats, so we can't calculate a difference. */
698 <                return get_diskio_stats(entries);
698 >                return sg_get_disk_io_stats(entries);
699          }
700  
701          /* Resize the results array to match the previous stats. */
# Line 704 | Line 709 | diskio_stat_t *get_diskio_stats_diff(int *entries){
709                  src = &diskio_stats[i];
710                  dest = &diff[i];
711  
712 <                if (dest->disk_name != NULL) {
713 <                        free(dest->disk_name);
712 >                if (sg_update_string(&dest->disk_name, src->disk_name) < 0) {
713 >                        return NULL;
714                  }
710                dest->disk_name = strdup(src->disk_name);
715                  dest->read_bytes = src->read_bytes;
716                  dest->write_bytes = src->write_bytes;
717                  dest->systime = src->systime;
718          }
719  
720          /* Get a new set of stats. */
721 <        if (get_diskio_stats(&new_count) == NULL) {
721 >        if (sg_get_disk_io_stats(&new_count) == NULL) {
722                  return NULL;
723          }
724  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines