OpenBSD CVS

CVS log for src/usr.bin/tmux/file.c


[BACK] Up to [local] / src / usr.bin / tmux

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.15 / (download) - annotate - [select for diffs], Mon Apr 17 17:58:35 2023 UTC (13 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.14: +4 -4 lines
Diff to previous 1.14 (colored)

Make the check if printing is allowed the same as writing which is less
confusing.

Revision 1.14 / (download) - annotate - [select for diffs], Fri Jan 6 07:09:27 2023 UTC (16 months, 1 week ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.13: +41 -5 lines
Diff to previous 1.13 (colored)

If a pane is killed, cancel reading from the file. GitHub issue 3422.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Aug 24 07:22:30 2022 UTC (20 months, 3 weeks ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.12: +5 -1 lines
Diff to previous 1.12 (colored)

Check for NULL returns from bufferevent_new.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Aug 22 13:48:29 2021 UTC (2 years, 8 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Do not double free expanded path in source-file, also remove some
unnecessary assignments.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jun 10 07:51:43 2021 UTC (2 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

Fire check callback after cleaning up event so it does not get stuck,
from Jeongho Jang in GitHub issue 2695.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Feb 12 06:52:48 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

Do not care about the server socket closing if exiting anyway.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Feb 11 09:39:29 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.8: +21 -1 lines
Diff to previous 1.8 (colored)

Add a couple of helper functions, and flush imsgs on exit.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Feb 11 08:28:45 2021 UTC (3 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.7: +409 -27 lines
Diff to previous 1.7 (colored)

Move file handling protocol stuff all into file.c so it can be reused
more easily.

Revision 1.7 / (download) - annotate - [select for diffs], Tue May 26 08:41:47 2020 UTC (3 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.6: +7 -3 lines
Diff to previous 1.6 (colored)

Pass the stdout file descriptor from the client as well as stdin and use
them for control clients directly instead of passing everything via the
client.

Revision 1.6 / (download) - annotate - [select for diffs], Fri May 8 14:15:11 2020 UTC (4 years ago) by nicm
Branch: MAIN
Changes since 1.5: +2 -1 lines
Diff to previous 1.5 (colored)

imsg.h needs uio.h, pointed out by deraadt

Revision 1.5 / (download) - annotate - [select for diffs], Mon Dec 16 16:39:03 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.4: +15 -3 lines
Diff to previous 1.4 (colored)

If /dev/fd/X is a symlink and realpath() expands symlinks, /dev/fd/X
ends up pointing to the wrong place before it is passed to the client.
The path is only used internally so there is no real need for
realpath(), remove it and move the get_path function to file.c where all
the callers are.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Dec 16 16:09:28 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

Need to include message size in the maximum buffer calculation.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Dec 16 15:48:50 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.2: +37 -24 lines
Diff to previous 1.2 (colored)

Instead of using large buffers in imsgs, add the data or path onto the end.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Dec 12 11:51:32 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

Do not check if client is dead if it is NULL.

Revision 1.1 / (download) - annotate - [select for diffs], Thu Dec 12 11:39:56 2019 UTC (4 years, 5 months ago) by nicm
Branch: MAIN

Rewrite the code for reading and writing files. Now, if the client is
not attached, the server process asks it to open the file, similar to
how works for stdin, stdout, stderr. This makes special files like
/dev/fd/X work (used by some shells). stdin, stdout and stderr and
control mode are now just special cases of the same mechanism. This will
also make it easier to use for other commands that read files such as
source-file.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.